Andrew Barnert added the comment: > 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__. ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue25864> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com