[issue39111] Misleading documentation
Murali Ganapathy
report at bugs.python.org
Fri Dec 20 13:40:55 EST 2019
Murali Ganapathy <murali at google.com> 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 called
# foo called
False
====
Base.__eq__ is not called here. Is calling of object.__eq__ special cased?
----------
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue39111>
_______________________________________
More information about the Python-bugs-list
mailing list