In [1]:
class A:
def __add__(self, other):
return NotImplemented
class B(A):
val = 1
def __add__(self, other):
return self.val + other.val
class C(B):
val = 3
def __add__(self, other):
return NotImplemented
In [2]:
A() + A()
In [ ]: