[Python-Dev] Is explicit registration of Iterators needed?
Serhiy Storchaka
storchaka at gmail.com
Fri Oct 7 09:36:55 EDT 2016
A number of builtin iterator classes (but not all builtin iterator
classes) are registered with the Iterator ABC in
Lib/_collections_abc.py. But isinstance(it, Iterable) check works
without explicit registration, because Iterable has __subclasshook__
that checks iterator methods. Is there a need in explicit
registrations? Or their can be safely removed?
More information about the Python-Dev
mailing list