def __sub__(self, other): # Subtract other (interval or point) from self. if self.TYPE != other.TYPE: raise CyclerTypeError(self.TYPE, self, other.TYPE, other) return self.sub(other)
def __add__(self, other): # Add other (point or interval) to self. if self.TYPE != other.TYPE: raise CyclerTypeError(self.TYPE, self, other.TYPE, other) return self.add(other)