[pypy-commit] pypy default: fix test
arigo
pypy.commits at gmail.com
Thu Nov 10 03:46:49 EST 2016
Author: Armin Rigo <arigo at tunes.org>
Branch:
Changeset: r88285:76a9a43a1e8c
Date: 2016-11-10 09:45 +0100
http://bitbucket.org/pypy/pypy/changeset/76a9a43a1e8c/
Log: fix test
diff --git a/rpython/rlib/rarithmetic.py b/rpython/rlib/rarithmetic.py
--- a/rpython/rlib/rarithmetic.py
+++ b/rpython/rlib/rarithmetic.py
@@ -340,7 +340,10 @@
def __mul__(self, other):
x = long(self)
y = other # may be a float
- return self._widen(other, x * y)
+ z = x * y
+ if isinstance(z, (int, long)):
+ z = self._widen(other, z)
+ return z
__rmul__ = __mul__
def __div__(self, other):
More information about the pypy-commit
mailing list