[issue4296] Python assumes identity implies equivalence; contradicts NaN

Mark Dickinson report at bugs.python.org
Tue Nov 11 17:44:54 CET 2008


Mark Dickinson <dickinsm at gmail.com> added the comment:

[Michael]
> the real issue that caused problems [...] was Python deciding to
> silently cast NaN falues to 0L
> [...]
> it sounds like there is no intention to fix this for versions prior
> to 3.0,

Oh, <rude words> <rude words> <more rude words>!  Guido's message does
indeed say that that behaviour shouldn't be changed before 3.0.  And
if I'd managed to notice his message, I wouldn't have 'fixed' it for 
2.6. 

Python 2.7a0 (trunk:67115, Nov  6 2008, 08:37:21) 
[GCC 4.0.1 (Apple Inc. build 5488)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> int(float('nan'))
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ValueError: cannot convert float NaN to integer

:-(.

[Imagine me looking extreeemely sheepish.]

I guess I owe apologies to Christian and Guido here.  Sorry, folks.  Is 
there any way I can make amends?

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue4296>
_______________________________________


More information about the Python-bugs-list mailing list