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

Function readmodule

Lib/pyclbr.py:100–110  ·  view source on GitHub ↗

Return Class objects for the top-level classes in module. This is the original interface, before Functions were added.

(module, path=None)

Source from the content-addressed store, hash-verified

98
99
100def readmodule(module, path=None):
101 """Return Class objects for the top-level classes in module.
102
103 This is the original interface, before Functions were added.
104 """
105
106 res = {}
107 for key, value in _readmodule(module, path or []).items():
108 if isinstance(value, Class):
109 res[key] = value
110 return res
111
112def readmodule_ex(module, path=None):
113 """Return a dictionary with all functions and classes in module.

Callers

nothing calls this directly

Calls 2

_readmoduleFunction · 0.85
itemsMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…