◐ Shell
clean mode source ↗

Message 257063 - Python tracker

> 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__.