Murali Ganapathy <mur...@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 <rep...@bugs.python.org>
<https://bugs.python.org/issue39111>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to