示例#1
0
 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)
示例#2
0
 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)