What does “i” represent in Python .pyi extension?

前端 未结 3 1185
时光取名叫无心
时光取名叫无心 2020-12-13 01:42

In Python, what does \"i\" represent in .pyi extension?

In PEP-484, it mentions .pyi is \"a stub file\" but no mnemonic help on the extension. So does the \"i\" mea

3条回答
  •  猫巷女王i
    2020-12-13 01:59

    Apparently PyCharm creates .pyi file for its own purposes:

    The *.pyi files are used by PyCharm and other development tools to provide more information, such as PEP 484 type hints, than it is able to glean from introspection of extension types and methods. They are not intended to be imported, executed or used for any other purpose other than providing info to the tools. If you don't use use a tool that makes use of .pyi files then you can safely ignore this file.

    See: https://www.python.org/dev/peps/pep-0484/ https://www.jetbrains.com/help/pycharm/2016.1/type-hinting-in-pycharm.html

    This comment was found in: python27/Lib/site-packages/wx/core.pyi

提交回复
热议问题