MCPcopy Index your code
hub / github.com/RustPython/RustPython / create_module

Method create_module

Lib/importlib/_bootstrap.py:1162–1172  ·  view source on GitHub ↗

Set __file__, if able.

(spec)

Source from the content-addressed store, hash-verified

1160
1161 @staticmethod
1162 def create_module(spec):
1163 """Set __file__, if able."""
1164 module = _new_module(spec.name)
1165 try:
1166 filename = spec.loader_state.filename
1167 except AttributeError:
1168 pass
1169 else:
1170 if filename:
1171 module.__file__ = filename
1172 return module
1173
1174 @staticmethod
1175 def exec_module(module):

Callers 1

module_from_specFunction · 0.45

Calls 1

_new_moduleFunction · 0.70

Tested by

no test coverage detected