I have a use-case (custom number-like objects) that would be made simpler if it were possible to override the behavior of the +
, -
, *
, and /
, similar to python's magic __add__
, __sub__
, __mul__
, and __div__
functions. I was thinking of a property such that when something is, say, added to an object, object.operators.add
is called.
Thoughts?