On 31 December 2017 at 20:05, Antoine Pitrou wrote:
> On Sun, 31 Dec 2017 19:31:06 +0100
> Ivan Levkivskyi
> wrote:
>
> > On 31 December 2017 at 19:24, Yahya Abou 'Imran via Python-ideas <
> > python-ideas@python.org> wrote:
> >
> > >
> > > >I guess a
On Sun, 31 Dec 2017 19:31:06 +0100
Ivan Levkivskyi
wrote:
> On 31 December 2017 at 19:24, Yahya Abou 'Imran via Python-ideas <
> python-ideas@python.org> wrote:
>
> >
> > >I guess a PR to fix the registry output would make sense (first file a
> > bug on bugs.python.org
On 31 December 2017 at 19:24, Yahya Abou 'Imran via Python-ideas <
python-ideas@python.org> wrote:
>
> >I guess a PR to fix the registry output would make sense (first file a
> bug on bugs.python.org for it).
>
> Ok, I will!
>
>
Please don't hurry with this. I am going to rewrite ABCMeta in C
Yeah, I guess few developers have needed to use _dump_registry(), and also
it's easy enough to just access e.g. Iterator._abc_registry yourself.
The reason Iterator._abc_registry is empty is that no class directly
registered with it -- they are all registered with e.g. Sequence. The cache
In python 2.7, ABCs's caches and registries are sets. But in python 3.6 they
are WeakSet.
In consequence, the output of _dump_registry() is almost useless:
>>> from collections import abc
>>> abc.Iterator._dump_registry()
Class: collections.abc.Iterator
Inv.counter: 40
_abc_cache: