Message87509
Two problems with float.fromhex:
(1) it incorrectly rejects trailing whitespace on infs and nans:
>>> float.fromhex('a.0 ')
10.0
>>> float.fromhex('nan ')
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ValueError: invalid hexadecimal floating-point string
(2) The implementation uses PyOS_strnicmp for detecting nans and infs,
which is locale-aware. A locale-unaware case-insensitive comparison
should be used instead. I don't know of any locale where this actually
makes a difference, but I think it should be fixed anyway. |
|
Date |
User |
Action |
Args |
2009-05-09 19:50:17 | mark.dickinson | set | recipients:
+ mark.dickinson |
2009-05-09 19:50:17 | mark.dickinson | set | messageid: <1241898617.16.0.557804357136.issue5981@psf.upfronthosting.co.za> |
2009-05-09 19:50:15 | mark.dickinson | link | issue5981 messages |
2009-05-09 19:50:14 | mark.dickinson | create | |
|