FW: Why float('Nan') == float('Nan') is False

Grant Edwards grant.b.edwards at gmail.com
Thu Feb 14 18:14:43 EST 2019


On 2019-02-14, Avi Gross <avigross at verizon.net> wrote:

> I experimented a bit:
>
>>>> float("nan ")
> nan
>>>> float("  nan")
> Nan
>>>> float("  nAn")
> nan

That's curious.  I've never seen "Nan" before.  What version of Python
are you using?

-- 
Grant Edwards               grant.b.edwards        Yow! NANCY!!  Why is
                                  at               everything RED?!
                              gmail.com            




More information about the Python-list mailing list