在importlib模块中,有个__init__.py文件,这个文件下有个导入模块的代码如下:
import _frozen_importlib as _bootstrap
我找不到涉及__frozen_importli的代码在哪里,我尝试过在pycharm里按住Ctrl单击或者选中后按Ctrl+B都不好使,提示:connot find declaration to go to。我不知道这涉及到了什么知识。
局部完整代码如下:
import _imp # Just the builtin component, NOT the full Python module
import sys
try:
import _frozen_importlib as _bootstrap
except ImportError:
from . import _bootstrap
_bootstrap._setup(sys, _imp)
else:
# importlib._bootstrap is the built-in import, ensure we don't create
# a second copy of the module.
_bootstrap.__name__ = 'importlib._bootstrap'
_bootstrap.__package__ = 'importlib'
try:
_bootstrap.__file__ = __file__.replace('__init__.py', '_bootstrap.py')
except NameError:
# __file__ is not guaranteed to be defined, e.g. if this code gets
# frozen by a tool like cx_Freeze.
pass
sys.modules['importlib._bootstrap'] = _bootstrap