This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author abarnert
Recipients abarnert, martin.panter, ncoghlan, r.david.murray, serhiy.storchaka
Date 2016-01-01.21:25:14
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
> I don’t think you need to define __len__() to get an iterable, only __getitem__().

The "old-style sequence protocol" means having a __getitem__ that works for values from 0 to __len__() and raises IndexError at __len__(). You don't need to be a complete old-style sequence to be iterable; just having __getitem__ makes you iterable (without being a or a typing.Iterable), and having __getitem__ and __len__ makes you reversible (without being a typing.Reversible). At any rate, this bug isn't about avoiding false negatives for the implicit ABCs, but false positives: defining __iter__ = None blocks the old-style sequence protocol, but makes isinstance(Iterable) true.
Date User Action Args
2016-01-01 21:25:14abarnertsetrecipients: + abarnert, ncoghlan, r.david.murray, martin.panter, serhiy.storchaka
2016-01-01 21:25:14abarnertsetmessageid: <>
2016-01-01 21:25:14abarnertlinkissue25958 messages
2016-01-01 21:25:14abarnertcreate