Author rhettinger
Recipients Zero, docs@python, r.david.murray, rhettinger, terry.reedy, veky
Date 2017-07-17.15:05:53
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
> Or at least, if we cannot do that because of backward
> compatibility:-(, to explicitly document that Iterable ABC
> _does not_ fully encompass what we mean by "being iterable".

That would be a reasonable amendment to docs.

I don't think it is either desirable or possible for to recognize iterables with __getitem__.  We cannot know it advance whether __getitem__ is a mapping or a sequence.  IIRC, that particular problem was the motivation for creating the ABCs. Without a user registering a class as Iterable or without inheriting from Iterable, there is really no way to know.
Date User Action Args
2017-07-17 15:05:53rhettingersetrecipients: + rhettinger, terry.reedy, r.david.murray, Zero, docs@python, veky
2017-07-17 15:05:53rhettingersetmessageid: <>
2017-07-17 15:05:53rhettingerlinkissue18558 messages
2017-07-17 15:05:53rhettingercreate