I have a class called phi defined on certain ring which morally should be $\mathbb C$-valued, $\phi: R \to \mathbb Z$, bt from that I need only that adding $0_{\mathbb Z}$ to the phi-elements does nothing, and the next (pseudocode) works for adding $0$ by the right to the phi elements:
class phi: ...
...
def __add__(self, other):
if type(other) == Integers
return self
How can I define the addition of a left argument in $\mathbb Z$ with an element of my phi class to be trivial, without changing the __add__ of the Integer class? (Or a work arround. Actually my target is not the integers but the sage symbolic ring, SR.)