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()


---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
<ipython-input-2-9dec2e482fe5> in <module>
----> 1 A() + A()

TypeError: unsupported operand type(s) for +: 'A' and 'A'

In [ ]: