Lines Matching refs:other
14 def __coerce__(self, other):
15 if isinstance(other, CoerceNumber):
16 return self.arg, other.arg
18 return (self.arg, other)
24 def __coerce__(self, other):
25 if isinstance(other, CoerceTo):
26 return self.arg, other.arg
28 return self.arg, other
39 def __add__(self,other):
40 return self.arg + other
42 def __radd__(self,other):
43 return other + self.arg
45 def __sub__(self,other):
46 return self.arg - other
48 def __rsub__(self,other):
49 return other - self.arg
51 def __mul__(self,other):
52 return self.arg * other
54 def __rmul__(self,other):
55 return other * self.arg
57 def __div__(self,other):
58 return self.arg / other
60 def __rdiv__(self,other):
61 return other / self.arg
63 def __truediv__(self,other):
64 return self.arg / other
66 def __rtruediv__(self,other):
67 return other / self.arg
69 def __floordiv__(self,other):
70 return self.arg // other
72 def __rfloordiv__(self,other):
73 return other // self.arg
75 def __pow__(self,other):
76 return self.arg ** other
78 def __rpow__(self,other):
79 return other ** self.arg
81 def __mod__(self,other):
82 return self.arg % other
84 def __rmod__(self,other):
85 return other % self.arg
87 def __cmp__(self, other):
88 return cmp(self.arg, other)
99 # e = equals other results
310 def __cmp__(slf, other):
311 self.assertTrue(other == 42, 'expected evil_coercer, got %r' % other)
317 def __cmp__(slf, other):
318 self.assertTrue(other == 42, 'expected evil_coercer, got %r' % other)
326 def __coerce__(self, other):
327 return other, self