MCPcopy Index your code
hub / github.com/python/cpython / create_module

Method create_module

Lib/importlib/_bootstrap.py:911–916  ·  view source on GitHub ↗

Create a built-in module

(spec)

Source from the content-addressed store, hash-verified

909
910 @staticmethod
911 def create_module(spec):
912 """Create a built-in module"""
913 if spec.name not in sys.builtin_module_names:
914 raise ImportError(f'{spec.name!r} is not a built-in module',
915 name=spec.name)
916 return _call_with_frames_removed(_imp.create_builtin, spec)
917
918 @staticmethod
919 def exec_module(module):

Callers

nothing calls this directly

Calls 1

Tested by

no test coverage detected