Message358719
The documentation at https://docs.python.org/3.6/library/constants.html#NotImplemented states
If all attempts return NotImplemented, the interpreter will raise an appropriate exception. However this is not true for __eq__.
===
class Foo:
def __eq__(self, other):
return NotImplemented
Foo() == Foo() # returns False, does not throw an exception
==== |
|
Date |
User |
Action |
Args |
2019-12-20 16:42:56 | murali | set | recipients:
+ murali, docs@python |
2019-12-20 16:42:56 | murali | set | messageid: <1576860176.18.0.619926767128.issue39111@roundup.psfhosted.org> |
2019-12-20 16:42:56 | murali | link | issue39111 messages |
2019-12-20 16:42:55 | murali | create | |
|