[issue2813] No float formatting in PyString_FromFormat
report at bugs.python.org
Mon Jun 23 01:47:28 CEST 2008
Jean Brouwers <MrJean1 at Gmail.com> added the comment:
Attached is another patch for file Objects/stringobject.c(relative to
Python 2.6b1) which supports the double %f and long double %LF formats.
However, %Lf is included only if symbol LDBL_DIG is defined in header
file <float.h> on the underlying platform.
This patch also handles the long and size_t flags correctly in the first
loop to determine the size of the buffer under
case 'd': case 'u': case 'i': case 'x':
Btw, it does not make sense to handle float since there is not formnat
specification for floats.
Added file: http://bugs.python.org/file10702/stringobject_format_Lf.patch
Python tracker <report at bugs.python.org>
More information about the Python-bugs-list