[Python-ideas] Improve ABCs _dump_registry() readability

Guido van Rossum guido at python.org
Sun Dec 31 13:47:49 EST 2017

Ah, glad the mystery's solved! And sorry for the misdirection.

On Sun, Dec 31, 2017 at 11:38 AM, Yahya Abou 'Imran <
yahya-abou-imran at protonmail.com> wrote:

> >>>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.

--Guido van Rossum (python.org/~guido)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20171231/62a3b452/attachment.html>

More information about the Python-ideas mailing list