MCPcopy Index your code
hub / github.com/RustPython/RustPython / _shadowed_dict

Function _shadowed_dict

Lib/inspect.py:1712–1722  ·  view source on GitHub ↗
(klass)

Source from the content-addressed store, hash-verified

1710
1711
1712def _shadowed_dict(klass):
1713 # gh-118013: the inner function here is decorated with lru_cache for
1714 # performance reasons, *but* make sure not to pass strong references
1715 # to the items in the mro. Doing so can lead to unexpected memory
1716 # consumption in cases where classes are dynamically created and
1717 # destroyed, and the dynamically created classes happen to be the only
1718 # objects that hold strong references to other objects that take up a
1719 # significant amount of memory.
1720 return _shadowed_dict_from_weakref_mro_tuple(
1721 *[make_weakref(entry) for entry in _static_getmro(klass)]
1722 )
1723
1724
1725def getattr_static(obj, attr, default=_sentinel):

Callers 2

_check_classFunction · 0.85
getattr_staticFunction · 0.85

Tested by

no test coverage detected