[issue10557] Malformed error message from float()

Alexander Belopolsky report at bugs.python.org
Fri Dec 3 18:54:28 CET 2010


Alexander Belopolsky <belopolsky at users.sourceforge.net> added the comment:

On Thu, Dec 2, 2010 at 9:53 PM, Alexander Belopolsky
<report at bugs.python.org> wrote:
..
> .. The honest reason for the exclusion is that I gave up chasing a bug that only shows
> in full regrtest runs.

I have realized where the problem was. PyUnicode_FromUnicode()
"helpfully" interns single-character  Unicode objects in the Latin-1
range.  So when TransformDecimal replaces whitespace with ' ', it may
garble cached strings.  I think this optimization is a left-over from
the time when unicode did not have interning, but it is never a good
idea to change immutable objects in-place after creation, so I'll fix
this problem in my code.

----------

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


More information about the Python-bugs-list mailing list