I'm trying to figure out if it is possible to define arithmetic operations on python classes. What I would like to do something like:
class a():
@classmethod
def __add__(cls, other):
pass
a + a
But, of course I get:
TypeError: unsupported operand type(s) for +: 'type' and 'type'
Is such a thing even possible?