def __sub__(self, other):
    return NotImplemented


class Sub2(object):
    number = 2

def __rsub__(self, other):
    return other.number - self.number
a = Sub1()
b = Sub2()
print(a - b)
Использование обратных операторов в Python