float("nan") in set or as key
Erik Max Francis
max at alcyone.com
Sat May 28 20:44:56 EDT 2011
Albert Hopkins wrote:
> On Sun, 2011-05-29 at 00:41 +0100, MRAB wrote:
>>>> 1.0 == 1.0
> True
>>>> float("nan") == float("nan")
> False
>
> I can't cite this in a spec, but it makes sense (to me) that two things
> which are nan are not necessarily the same nan.
It's part of the IEEE standard.
--
Erik Max Francis && max at alcyone.com && http://www.alcyone.com/max/
San Jose, CA, USA && 37 18 N 121 57 W && AIM/Y!M/Skype erikmaxfrancis
There was never a good war or a bad peace.
-- Benjamin Franklin, 1706-1790
More information about the Python-list
mailing list