Following piece of code works fine in Python 3 (3.5.2) but raises an AttributeError: 'super' object has no attribute '__eq__'
in Python 2 (2.7.12)
class Derived(int):
def __eq__(self, other):
return super(Derived, self).__eq__(other)
a, b = Derived(1024), Derived(1729)
print(a == b)
Python 3 behaviour is expected. I'm trying to understand why it doesn't work in Python 2.
Please note that this question is not a duplicate of 'super' object has no attribute '__eq__'