1.1 --- a/lib/__builtins__/int.py Sun Nov 20 00:09:02 2016 +0100
1.2 +++ b/lib/__builtins__/int.py Sun Nov 20 00:09:36 2016 +0100
1.3 @@ -77,14 +77,14 @@
1.4
1.5 def __rsub__(self, other):
1.6 "Return a new int for the operation."
1.7 - return _binary_op(self, other, native._int_rsub)
1.8 + return _binary_op(other, self, native._int_sub)
1.9
1.10 __mul__ = __rmul__ = __imul__
1.11 __div__ = __idiv__
1.12
1.13 def __rdiv__(self, other):
1.14 "Return a new int for the operation."
1.15 - return _binary_op(self, other, native._int_rdiv)
1.16 + return _binary_op(other, self, native._int_div)
1.17
1.18 def __floordiv__(self, other): pass
1.19 def __rfloordiv__(self, other): pass
1.20 @@ -94,13 +94,13 @@
1.21
1.22 def __rmod__(self, other):
1.23 "Return a new int for the operation."
1.24 - return _binary_op(self, other, native._int_rmod)
1.25 + return _binary_op(other, self, native._int_mod)
1.26
1.27 __pow__ = __ipow__
1.28
1.29 def __rpow__(self, other):
1.30 "Return a new int for the operation."
1.31 - return _binary_op(self, other, native._int_rpow)
1.32 + return _binary_op(other, self, native._int_pow)
1.33
1.34 __and__ = __rand__ = __iand__
1.35 __or__ = __ror__ = __ior__
1.36 @@ -133,7 +133,11 @@
1.37 def __invert__(self): pass
1.38 def __neg__(self): pass
1.39 def __pos__(self): pass
1.40 - def __str__(self): pass
1.41 +
1.42 + def __str__(self):
1.43 + "Return a string representation."
1.44 + return native._int_str(self)
1.45 +
1.46 def __lshift__(self): pass
1.47 def __rlshift__(self): pass
1.48 def __rshift__(self): pass
1.49 @@ -143,6 +147,6 @@
1.50
1.51 def __bool__(self):
1.52 "Return whether this int is non-zero."
1.53 - return _negate(native._int_eq(self, 0))
1.54 + return native._int_ne(self, 0)
1.55
1.56 # vim: tabstop=4 expandtab shiftwidth=4