[Python-Dev] Why is nan != nan? (original) (raw)

Nick Coghlan ncoghlan at gmail.com
Thu Mar 25 13:10:27 CET 2010


Mark Dickinson wrote:

+0.2 from me. I could happily live with this change; but could also equally live with the existing weirdness.

It's still a little odd for an immutable type to care about object identity, but I guess oddness comes with the floating-point territory. :)

The trick for me came in thinking of NaN as a set of values rather than a single value - at that point, the different id values just reflect the multitude of members of that set.

Cheers, Nick.

-- Nick Coghlan | ncoghlan at gmail.com | Brisbane, Australia



More information about the Python-Dev mailing list