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

Method _dump_registry

Lib/abc.py:125–135  ·  view source on GitHub ↗

Debug helper to print the ABC registry.

(cls, file=None)

Source from the content-addressed store, hash-verified

123 return _abc_subclasscheck(cls, subclass)
124
125 def _dump_registry(cls, file=None):
126 """Debug helper to print the ABC registry."""
127 print(f"Class: {cls.__module__}.{cls.__qualname__}", file=file)
128 print(f"Inv. counter: {get_cache_token()}", file=file)
129 (_abc_registry, _abc_cache, _abc_negative_cache,
130 _abc_negative_cache_version) = _get_dump(cls)
131 print(f"_abc_registry: {_abc_registry!r}", file=file)
132 print(f"_abc_cache: {_abc_cache!r}", file=file)
133 print(f"_abc_negative_cache: {_abc_negative_cache!r}", file=file)
134 print(f"_abc_negative_cache_version: {_abc_negative_cache_version!r}",
135 file=file)
136
137 def _abc_registry_clear(cls):
138 """Clear the registry (for debugging or testing)."""

Callers

nothing calls this directly

Calls 2

get_cache_tokenFunction · 0.90
_get_dumpFunction · 0.85

Tested by

no test coverage detected