Murali Ganapathy added the comment:
===
# python3
class Base:
def __eq__(self, other):
print("base called")
return super().__eq__(other)
class Foo(Base):
def __eq__(self, other):
print("foo called")
return NotImplemented
Foo() == Foo()
# foo calle
New submission from Murali Ganapathy :
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__