float("nan") in set or as key

Ethan Furman ethan at stoneleaf.us
Sat Jun 4 17:28:24 EDT 2011


Steven D'Aprano wrote:
> On Fri, 03 Jun 2011 23:04:38 -0700, Ethan Furman wrote:
> 
>> Steven D'Aprano wrote:
>>> NANs are not necessarily errors, they're hardly silent, and if you
>>> don't want NANs, the standard mandates that there be a way to turn them
>>> off.
>> So how does one turn them off in standard Python?
> 
> Turn them off? You have to find a way to turn them on first! What makes 
> you think that Python supports IEEE-754 for floats?

So if Python doesn't support IEEE-754 for floats, why the big deal about 
NaNs?  Does it have to do with how the NumPy, SciPy, Sage, etc., 
libraries interface with Python?

~Ethan~



More information about the Python-list mailing list