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

Method _dump_registry

Lib/_py_abc.py:72–81  ·  view source on GitHub ↗

Debug helper to print the ABC registry.

(cls, file=None)

Source from the content-addressed store, hash-verified

70 return subclass
71
72 def _dump_registry(cls, file=None):
73 """Debug helper to print the ABC registry."""
74 print(f"Class: {cls.__module__}.{cls.__qualname__}", file=file)
75 print(f"Inv. counter: {get_cache_token()}", file=file)
76 for name in cls.__dict__:
77 if name.startswith("_abc_"):
78 value = getattr(cls, name)
79 if isinstance(value, WeakSet):
80 value = set(value)
81 print(f"{name}: {value!r}", file=file)
82
83 def _abc_registry_clear(cls):
84 """Clear the registry (for debugging or testing)."""

Callers

nothing calls this directly

Calls 3

get_cache_tokenFunction · 0.85
setFunction · 0.85
startswithMethod · 0.45

Tested by

no test coverage detected