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

Function create_module

Lib/test/support/import_helper.py:370–378  ·  view source on GitHub ↗

Return a new, empty module.

(name, loader=None, *, ispkg=False)

Source from the content-addressed store, hash-verified

368
369
370def create_module(name, loader=None, *, ispkg=False):
371 """Return a new, empty module."""
372 spec = importlib.machinery.ModuleSpec(
373 name,
374 loader,
375 origin='<import_helper>',
376 is_package=ispkg,
377 )
378 return importlib.util.module_from_spec(spec)
379
380
381def _ensure_module(name, ispkg, addparent, clearnone):

Callers 1

_add_moduleFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…