Message159707
Check for integer overflow for width and precision is buggy.
Just a few examples (on platform with 32-bit int):
>>> '%.21d' % 123
'000000000000000000123'
>>> '%.2147483648d' % 123
'123'
>>> '%.2147483650d' % 123
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ValueError: prec too big
>>> '%.21f' % (1./7)
'0.142857142857142849213'
>>> '%.2147483648f' % (1./7)
'0.142857'
>>> '%.2147483650f' % (1./7)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ValueError: prec too big |
|
Date |
User |
Action |
Args |
2012-04-30 16:55:26 | serhiy.storchaka | set | recipients:
+ serhiy.storchaka |
2012-04-30 16:55:26 | serhiy.storchaka | set | messageid: <1335804926.58.0.135059540144.issue14700@psf.upfronthosting.co.za> |
2012-04-30 16:55:26 | serhiy.storchaka | link | issue14700 messages |
2012-04-30 16:55:25 | serhiy.storchaka | create | |
|