On Sat, Dec 28, 2019 at 7:03 PM Steve Barnes <gadgetst...@live.co.uk> wrote:
>
> Personally I still like the fundamental:
>
>
>
> def is_nan(num):
>
>     “”” Test for NaN “””
>
>     return num != num
>

Which was in Steven's original post, and which is dangerous because a
signalling nan will bomb. There's no easy way to get a safe True/False
about whether it's nan or not.

ChrisA
_______________________________________________
Python-ideas mailing list -- python-ideas@python.org
To unsubscribe send an email to python-ideas-le...@python.org
https://mail.python.org/mailman3/lists/python-ideas.python.org/
Message archived at 
https://mail.python.org/archives/list/python-ideas@python.org/message/BVCDQNSBJV7YY7Z46HEGCLG7WHSJKHUS/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to