Message237769
Hi, The string formatting module in python 2.7 incorrectly formats floating point values. The following code shows the problem
>>> print "%.10s"%(-7.7176718e-05)
-7.7176718
>> print "%.10s"%(-0.0000771767)
-7.71767e-
Ideally the code should have thrown an exception (first preference)
or it should have printed -0.0000771767 (second preference) or -7.7176718e-05 (third preference) |
|
Date |
User |
Action |
Args |
2015-03-10 14:26:26 | pushpendre rastogi | set | recipients:
+ pushpendre rastogi |
2015-03-10 14:26:26 | pushpendre rastogi | set | messageid: <1425997586.58.0.418147847293.issue23627@psf.upfronthosting.co.za> |
2015-03-10 14:26:26 | pushpendre rastogi | link | issue23627 messages |
2015-03-10 14:26:26 | pushpendre rastogi | create | |
|