def __mul__(self, other): return Binop('*', self, other)
def __rmul__(self, other): return Binop('*', other, self)
def __div__(self, other): return Binop('/', self, other)
- def __truediv__(self, other): return Binop('/', self, other)
def __rdiv__(self, other): return Binop('/', other, self)
+ def __truediv__(self, other): return Binop('/', self, other)
+ def __rtruediv__(self, other): return Binop('/', other, self)
+ def __floordiv__(self, other): return Binop('//', self, other)
+ def __rfloordiv__(self, other): return Binop('//', other, self)
def __pow__(self, other): return Binop('**', self, other)
def __rpow__(self, other): return Binop('**', other, self)
def __getitem__(self,i):return Binop('[]',self,i)
'*': lambda a, b: a * b,
'-': lambda a, b: a - b,
'/': lambda a, b: a / b,
+ '//': lambda a, b: a // b,
'**': lambda a, b: a ** b,
'[]': lambda a, b: a[b] ,
}