[Python-ideas] Improve ABCs _dump_registry() readability

Yahya Abou 'Imran yahya-abou-imran at protonmail.com
Sun Dec 31 13:38:07 EST 2017

>>>I guess a PR to fix the registry output would make sense (first file a bug onbugs.python.org for it).
>>Ok, I will!
>Please don't hurry with this. I am going to rewrite ABCMeta in C soon.
>In fact most of the work is done but I am waiting for implementation of PEP 560 to settle (need few more days for this).
>In the C version the caches/registry will be simpler and will not use WeakSet (instead they will be thin C wrappers around normal sets).

Ok, no problem.

Found out myself why the registry's empty:
every iterator passed to Iterator.register() defines __iter__ and __next__, so they satisfy Iterator.__subclasshook__ and are added to the cache beforehand.

More information about the Python-ideas mailing list