[Python-ideas] math.inf and math.nan constants

Mark Lawrence breamoreboy at yahoo.co.uk
Mon Jan 12 17:44:29 CET 2015


On 12/01/2015 16:05, Stephen J. Turnbull wrote:
> Chris Barker - NOAA Federal writes:
>
>   > > But it's not a singleton, not even in the class of NaNs.  It's a named
>   > > constant, like zero or pi.
>   >
>   > Right, it's a particular value of a float -- more that that, it's a
>   > bunch if values, so even less a singleton than pi, even.
>
> AFAIK, the proposed math.nan is *not* a bunch of values.  It's a
> particular float value that happens to be a NaN, just as math.pi is a
> particular float value that happens not to be a NaN.
>

The implementation is here 
https://hg.python.org/cpython/rev/cf4bf577749c so as "Although 
practicality beats purity." can we move on now please?

-- 
My fellow Pythonistas, ask not what our language can do for you, ask
what you can do for our language.

Mark Lawrence



More information about the Python-ideas mailing list