[Python-Dev] Not-a-Number (was PyObject_RichCompareBool identity shortcut)

Nick Coghlan ncoghlan at gmail.com
Thu Apr 28 12:31:20 CEST 2011


On Thu, Apr 28, 2011 at 7:17 PM, Greg Ewing <greg.ewing at canterbury.ac.nz> wrote:
> Mark Shannon wrote:
>
>> NaN does not have to be a float or a Decimal.
>> Perhaps it should have its own class.
>
> Perhaps, but that wouldn't solve anything on its own. If
> this new class compares reflexively, then it still violates
> IEE754. Conversely, existing NaNs could be made to compare
> reflexively without making them a new class.

And 3rd party NaNs can still do whatever the heck they want :)

Cheers,
Nick.

-- 
Nick Coghlan   |   ncoghlan at gmail.com   |   Brisbane, Australia


More information about the Python-Dev mailing list