Author: Daniel Patrick <[email protected]>
Branch: py3.5
Changeset: r87380:a388db9afbb6
Date: 2016-09-25 21:28 +0100
http://bitbucket.org/pypy/pypy/changeset/a388db9afbb6/
Log: Revert change to rpython/rlib/rfloat.py in commit 0bf6794 (pull
request #481); amend error message in
pypy/objspace/std/floatobject.py instead.
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
@@ -207,7 +207,8 @@
try:
return rfloat.string_to_float(string)
except ParseStringError as e:
- raise wrap_parsestringerror(space, e, w_source)
+ raise oefmt(space.w_ValueError,
+ "could not convert string to float: %R", w_source)
w_value = w_x # 'x' is the keyword argument name in CPython
if space.lookup(w_value, "__float__") is not None:
diff --git a/rpython/rlib/rfloat.py b/rpython/rlib/rfloat.py
--- a/rpython/rlib/rfloat.py
+++ b/rpython/rlib/rfloat.py
@@ -25,7 +25,7 @@
globals().update(rffi_platform.configure(CConfig))
-INVALID_MSG = "could not convert string to float"
+INVALID_MSG = "invalid literal for float()"
def string_to_float(s):
"""
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit