Author: Amaury Forgeot d'Arc <[email protected]>
Branch: py3.6
Changeset: r93455:bea2e807c6dc
Date: 2017-12-14 00:05 +0100
http://bitbucket.org/pypy/pypy/changeset/bea2e807c6dc/
Log: CPython Issue #25971: Unify error messages in
float.as_integer_ratio(), Decimal.as_integer_ratio(), and Fraction
constructors.
diff --git a/pypy/objspace/std/floatobject.py b/pypy/objspace/std/floatobject.py
--- a/pypy/objspace/std/floatobject.py
+++ b/pypy/objspace/std/floatobject.py
@@ -620,10 +620,10 @@
num, den = float_as_rbigint_ratio(value)
except OverflowError:
raise oefmt(space.w_OverflowError,
- "cannot pass infinity to as_integer_ratio()")
+ "cannot convert Infinity to integer ratio")
except ValueError:
raise oefmt(space.w_ValueError,
- "cannot pass nan to as_integer_ratio()")
+ "cannot convert NaN to integer ratio")
w_num = space.newlong_from_rbigint(num)
w_den = space.newlong_from_rbigint(den)
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit