ast <n...@gmail.com> writes:

> Hello
>
>>>> float('Nan') == float('Nan')
> False
>
> Why ?
>
> Regards

Others have given the real answer -- IEEE says so, and the people who
wrote the standard are smarter than me.  All the same, this is my take
on the reason for it:  NaN is specifically a representation for "this
has no value".  The == operator compares the values of its operands;
something that has no value can't == anything, including itself.
-- 
https://mail.python.org/mailman/listinfo/python-list

Reply via email to