[issue10557] Malformed error message from float()

Ezio Melotti report at bugs.python.org
Sun Nov 28 06:37:16 CET 2010


Ezio Melotti <ezio.melotti at gmail.com> added the comment:

FWIW the UnicodeError comes from PyUnicode_EncodeDecimal (unicodeobject.c:6212) and the "ValueError: could not convert string to float" with the buggy � comes from PyOS_string_to_double (pystrtod.c:316).  Maybe PyOS_string_to_double should be fixed to display the string correctly, but I don't know what will be affected from that (and if it will make things worse or better).  The UnicodeError can be fixed in PyFloat_FromString (floatobject.c:174).

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue10557>
_______________________________________


More information about the Python-bugs-list mailing list