Author r.david.murray
Recipients Zero, docs@python, r.david.murray, terry.reedy
Date 2013-08-01.20:26:32
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
That would give you a false positive, though.  It would return True for the 'y' in my example, which is not iterable.  So Iterable's behavior here is an example of the Python design rule "resist the temptation to guess".

As Terry said, new classes should implement an __iter__ method.  The __getitem__ iteration support is for backward compatibility.
Date User Action Args
2013-08-01 20:26:32r.david.murraysetrecipients: + r.david.murray, terry.reedy, Zero, docs@python
2013-08-01 20:26:32r.david.murraysetmessageid: <>
2013-08-01 20:26:32r.david.murraylinkissue18558 messages
2013-08-01 20:26:32r.david.murraycreate