Mark Summerfield added the comment: On 2007-12-15, Christian Heimes wrote: > Christian Heimes added the comment: > > Guido is right. On Linux the system's sprintf() family prints %e, %g and > %f with two or three digits while Windows always uses three digits: > > Linux > >>> "%e" % 1e1 > '1.000000e+01' > >>> "%e" % 1e10 > '1.000000e+10' > >>> "%e" % 1e100 > '1.000000e+100' > > Windows > >>> "%e" % 1e1 > '1.000000e+001' > >>> "%e" % 1e10 > '1.000000e+010' > >>> "%e" % 1e100 > '1.000000e+100' > > The output could be changed in any of the functions: > Objects/floatobject.h:format_double() > Python/pystrtod.c:PyOS_ascii_formatd() > Python/mysnprint.c:PyOS_snprintf()
It seems to me that Python should provide consistent results across platforms wherever possible and that this is a gratuitous inconsistency that makes cross-platform testing less convenient than it need be. I'll take a look at those functions next week. __________________________________ Tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue1600> __________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com