python_stubs

https://stackoverflow.com/questions/24266114/pycharm-what-is-python-stubs

什么情况下会出现跳转到python_stubs?

当我们调用的函数是内置函数或仅二进制存在的函数(没有py文件,只有pyc等)时,pycharm会对某个版本进行硬编码而生成的伪函数(实际不是调用的这个,只是方便我们做开发)。

 

The python_stubs file is an automatically generated file that contains dummy definitions for built-in functions. It is used by PyCharm to infer the types of the built-in functions in the case that they weren't hardcoded for the given version.

 

https://peps.python.org/pep-0484/#stub-files

posted @ 2024-03-07 14:53  emanlee  阅读(9)  评论(0编辑  收藏  举报