Eric Smith <e...@trueblade.com> added the comment: >From the code:
/* assume %f produces at most (L)DBL_DIG digits before and after the decimal point, plus the latter plus a sign */ This is not correct. DBL_DIG is 15 on my x86 Linux machine. printf("%.*f\n", DBL_DIG, 1e20) produces a string that's 37 characters long. It might be best to use PyOS_double_to_string instead of snprintf, although we don't support long double there. I'm not sure long double support is all that important in practice (for Python), though. It would be easier to review this if the %p change weren't also included. That's looks like a good change, but it's a separate issue. unicodeobject.c should also be modified. In 3.x, it's unicodeobject.c and bytesobject.c that need to work. ---------- nosy: +marketdickinson _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue2813> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com