[issue25864] collections.abc.Mapping should include a __reversed__ that raises TypeError

Martin Panter report at bugs.python.org
Mon Jan 4 16:25:15 EST 2016


Martin Panter added the comment:

I’m sorry I only read your patch and did not see the NoLen class above Blocked. (I blame the lack of Reitveld review link.) I still think __getitem__() should have a valid signature, but I acknowledge that it’s not really your fault. :)

My main concern about the documentation was that in your patch you say _all_ special methods are now allowed to be None, but in your code you only check __iter__(). This is adding new undocumented inconsistencies e.g. with Iterable vs Container. Maybe it would be better to only say that setting __iter__ to None is supported, instead of setting any special method.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue25864>
_______________________________________


More information about the Python-bugs-list mailing list