[Python-Dev] Is explicit registration of Iterators needed? (original) (raw)
Serhiy Storchaka storchaka at gmail.com
Fri Oct 7 09:36:55 EDT 2016
- Previous message (by thread): [Python-Dev] C99
- Next message (by thread): [Python-Dev] Is explicit registration of Iterators needed?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
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?
- Previous message (by thread): [Python-Dev] C99
- Next message (by thread): [Python-Dev] Is explicit registration of Iterators needed?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]