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, abarry, curioswati, gvanrossum, r.david.murray, rhettinger, serhiy.storchaka, terry.reedy
Date 2015-12-27.02:37:07
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1451183827.68.0.178864548785.issue25864@psf.upfronthosting.co.za>
In-reply-to
Content
> This sounds good. Also, reversed() could then be modified to produce a
better error.

Should `iter` also be modified to produce a better error if `__iter__` is None?

Also, should this be documented? Maybe a sentence in the "Special method names" section of the "Data model" chapter, like this:

> To indicate that some syntax is not supported, set the corresponding special method name to None. For example, if __iter__ is None, the class is not iterable, so iter() will not look for __getitem__.
History
Date User Action Args
2015-12-27 02:37:07abarnertsetrecipients: + abarnert, gvanrossum, rhettinger, terry.reedy, r.david.murray, serhiy.storchaka, abarry, curioswati
2015-12-27 02:37:07abarnertsetmessageid: <1451183827.68.0.178864548785.issue25864@psf.upfronthosting.co.za>
2015-12-27 02:37:07abarnertlinkissue25864 messages
2015-12-27 02:37:07abarnertcreate