summaryrefslogtreecommitdiffstats
path: root/Lib/abc.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/abc.py')
-rw-r--r--Lib/abc.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/Lib/abc.py b/Lib/abc.py
index d13a0de..9bdc36d 100644
--- a/Lib/abc.py
+++ b/Lib/abc.py
@@ -170,9 +170,11 @@ class ABCMeta(type):
"""Debug helper to print the ABC registry."""
print("Class: %s.%s" % (cls.__module__, cls.__qualname__), file=file)
print("Inv.counter: %s" % ABCMeta._abc_invalidation_counter, file=file)
- for name in sorted(cls.__dict__.keys()):
+ for name in cls.__dict__:
if name.startswith("_abc_"):
value = getattr(cls, name)
+ if isinstance(value, WeakSet):
+ value = set(value)
print("%s: %r" % (name, value), file=file)
def __instancecheck__(cls, instance):