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

Function _load

Lib/importlib/_bootstrap.py:877–887  ·  view source on GitHub ↗

Return a new module object, loaded by the spec's loader. The module is not added to its parent. If a module is already in sys.modules, that existing module gets clobbered.

(spec)

Source from the content-addressed store, hash-verified

875
876# A method used during testing of _load_unlocked().
877def _load(spec):
878 """Return a new module object, loaded by the spec's loader.
879
880 The module is not added to its parent.
881
882 If a module is already in sys.modules, that existing module gets
883 clobbered.
884
885 """
886 with _ModuleLockManager(spec.name):
887 return _load_unlocked(spec)
888
889
890# Loaders #####################################################################

Callers 1

_load_dynamicMethod · 0.90

Calls 2

_ModuleLockManagerClass · 0.85
_load_unlockedFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…