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

Class Module

Lib/modulefinder.py:100–122  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

98
99
100class Module:
101
102 def __init__(self, name, file=None, path=None):
103 self.__name__ = name
104 self.__file__ = file
105 self.__path__ = path
106 self.__code__ = None
107 # The set of global names that are assigned to in the module.
108 # This includes those names imported through starimports of
109 # Python modules.
110 self.globalnames = {}
111 # The set of starimports this module did that could not be
112 # resolved, ie. a starimport from a non-Python module.
113 self.starimports = {}
114
115 def __repr__(self):
116 s = "Module(%r" % (self.__name__,)
117 if self.__file__ is not None:
118 s = s + ", %r" % (self.__file__,)
119 if self.__path__ is not None:
120 s = s + ", %r" % (self.__path__,)
121 s = s + ")"
122 return s
123
124class ModuleFinder:
125

Callers 1

add_moduleMethod · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…