[Python-ideas] checking for identity before comparing built-in objects

Mike Graham mikegraham at gmail.com
Thu Oct 4 16:07:36 CEST 2012


On Thu, Oct 4, 2012 at 10:02 AM, Mathias Panzenböck
<grosser.meister.morti at gmx.net> wrote:
> On 10/04/2012 03:53 PM, Steven D'Aprano wrote:
>>
>> py> NAN == NAN
>> False
>
>
> Why isn't this True anyway? Is there a PEP that explains this (IMHO odd)
> behavior?

IEEE 754 specifies this.

Mike



More information about the Python-ideas mailing list