[issue42826] typing.Iterable does not need __getitem__() method

Josh Rosenberg report at bugs.python.org
Mon Jan 4 23:52:33 EST 2021


Josh Rosenberg <shadowranger+python at gmail.com> added the comment:

As Serhiy says, the glossary term for an iterable is not the same as the documentation for typing.Iterable (which at this point is largely defined in terms of collections.abc.Iterable). True, collections.abc.Iterable does not detect classes that iterate via __getitem__, only via __iter__ (the docs are quite clear on this), but such __getitem__ based classes are still iterable in the broad sense of the term used in the glossary.

----------
nosy: +josh.r
resolution:  -> not a bug
stage:  -> resolved
status: open -> closed

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue42826>
_______________________________________


More information about the Python-bugs-list mailing list