| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -170,9 +170,11 @@ def _dump_registry(cls, file=None): | |||
| 170 | 170 | """Debug helper to print the ABC registry.""" | |
| 171 | 171 | print("Class: %s.%s" % (cls.__module__, cls.__qualname__), file=file) | |
| 172 | 172 | print("Inv.counter: %s" % ABCMeta._abc_invalidation_counter, file=file) | |
| 173 | - for name in sorted(cls.__dict__.keys()): | ||
| 173 | + for name in sorted(cls.__dict__): | ||
| 174 | 174 | if name.startswith("_abc_"): | |
| 175 | 175 | value = getattr(cls, name) | |
| 176 | + if isinstance(value, WeakSet): | ||
| 177 | + value = set(value) | ||
| 176 | 178 | print("%s: %r" % (name, value), file=file) | |
| 177 | 179 | ||
| 178 | 180 | def __instancecheck__(cls, instance): | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -0,0 +1 @@ | |||
| 1 | + Improve ABCMeta._dump_registry() output readability | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments