[issue4296] Python assumes identity implies equivalence; contradicts NaN
Christian Heimes
report at bugs.python.org
Tue Nov 11 17:54:00 CET 2008
Christian Heimes <lists at cheimes.de> added the comment:
The issue with nan -> 0L was fixed in Python 2.6. I can't recall if I
fixed it or somebody else but I know it was discussed.
$ python2.6
>>> long(float("nan"))
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ValueError: cannot convert float NaN to integer
>>> long(float("inf"))
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
OverflowError: cannot convert float infinity to integer
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue4296>
_______________________________________
More information about the Python-bugs-list
mailing list