diff options
author | yahya-abou-imran <yahya-abou-imran@protonmail.com> | 2018-01-12 09:18:44 (GMT) |
---|---|---|
committer | INADA Naoki <methane@users.noreply.github.com> | 2018-01-12 09:18:44 (GMT) |
commit | ae12f5d4c98f2095c2aadd58981453e955044697 (patch) | |
tree | 8381b2292d23ef84d3a611530385f42d02876770 /Lib/abc.py | |
parent | 05565ed27e4445e99b59268ba42cf4dd598ece77 (diff) | |
download | cpython-ae12f5d4c98f2095c2aadd58981453e955044697.zip cpython-ae12f5d4c98f2095c2aadd58981453e955044697.tar.gz cpython-ae12f5d4c98f2095c2aadd58981453e955044697.tar.bz2 |
bpo-32473: Improve ABCMeta._dump_registry() readability (GH-5091)
Diffstat (limited to 'Lib/abc.py')
-rw-r--r-- | Lib/abc.py | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -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): |