[Python-ideas] Disallow orderring comparison to NaN

Robert Kern robert.kern at gmail.com
Fri Apr 29 18:28:03 CEST 2011


On 4/29/11 11:14 AM, Alexander Belopolsky wrote:
> On Fri, Apr 29, 2011 at 3:00 AM, Nick Coghlan<ncoghlan at gmail.com>  wrote:
> ..
>> decimal already works that way:
>>
>>>>> from decimal import Decimal as d
>>>>> nan = d("nan")
>>>>> nan
>> Decimal('NaN')
>>>>> nan<  1
>> ..
>> decimal.InvalidOperation: comparison involving NaN
>
> That's what I thought and contrary to what Robert said early in the
> thread.

I have said nothing about decimal. I can requote the relevant portions of the 
IEEE-754 standard again, if you like.

-- 
Robert Kern

"I have come to believe that the whole world is an enigma, a harmless enigma
  that is made terrible by our own mad attempt to interpret it as though it had
  an underlying truth."
   -- Umberto Eco




More information about the Python-ideas mailing list