[Python-Dev] floatformat vs float_format (original) (raw)
David Cournapeau cournape at gmail.com
Thu Jan 1 07:11:11 CET 2009
- Next message: [Python-Dev] floatformat vs float_format
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Hi,
In python 2.6, there have been some effort to make float formatting more consistent between platforms, which is nice. Unfortunately, there is still one corner case, for example on windows:
print a -> print 'inf' print '%f' % a -> print '1.#INF'
The difference being that in the second case, the formatting is done in floatformat.c (in stringobject.c), whereas in the first case, it is done in format_float (in floatobject.c). Shouldn't both functions be calling the same underlying implementation, to avoid those inconsistencies ?
thanks,
David
- Next message: [Python-Dev] floatformat vs float_format
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]