01.05.22 19:32, Guido van Rossum пише:
Non should behave as closely as possible to it not being defined at all. So return NotImplemented.
But, as was noted by Spencer Brown, it is not how it works for __iter__(), __reversed__() and __contains__() (which have a special path for producing explicit error), and not how it currently works for __add__() and __eq__() (although they raise TypeError implicitly). It is all documented inhttps://docs.python.org/3.10/reference/datamodel.html#id2
If we are going to reconsider this, it is a large breaking change. _______________________________________________ Python-Dev mailing list -- python-dev@python.org To unsubscribe send an email to python-dev-le...@python.org https://mail.python.org/mailman3/lists/python-dev.python.org/ Message archived at https://mail.python.org/archives/list/python-dev@python.org/message/V5XNDNA3I3C5VAARBDSSF72ILYWKVI2M/ Code of Conduct: http://python.org/psf/codeofconduct/