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

Function add_package

Lib/test/support/import_helper.py:432–437  ·  view source on GitHub ↗

Return the module after creating it and adding it to sys.modules. If parents is True then also create any missing parents.

(spec, *, parents=True)

Source from the content-addressed store, hash-verified

430
431
432def add_package(spec, *, parents=True):
433 """Return the module after creating it and adding it to sys.modules.
434
435 If parents is True then also create any missing parents.
436 """
437 return _add_module(spec, True, parents)
438
439
440def ensure_module_imported(name, *, clearnone=True):

Callers

nothing calls this directly

Calls 1

_add_moduleFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…