为什么提供 __eq__ 时 __hash__ 不被继承?

Eri*_*ric 5 python hash inheritance python-2.x python-3.x

以下代码在 python 2.7 中有效,但在 python 3.5 中失败:

class Base(object):
    def __hash__(self):
        return 4

class Derived(Base): pass

class DerivedEquatable(Base):
    def __eq__(self, other):
        return False

assert Base.__hash__ is not None
assert Derived.__hash__ is not None
assert DerivedEquatable.__hash__ is not None  # AssertionError in python 3
Run Code Online (Sandbox Code Playgroud)

这种行为改变记录在哪里?