[Python-ideas] Disallow orderring comparison to NaN

Terry Reedy tjreedy at udel.edu
Sat Apr 30 02:37:28 CEST 2011


On 4/29/2011 6:50 PM, Alexander Belopolsky wrote:

> realize that Python does have a mechanism that would allow to
> simultaneously raise an exception and deliver the result.  This is
> what warnings do.  Since changing NaN<  0 to raise an error would have
> to be done by issuing a deprecation warning first, why can't we just
> issue appropriate warning on invalid operations?

Adding FloatWarning would probably be easier than changing behavior to 
raise an exception. People who care could change into an exception.

-- 
Terry Jan Reedy




More information about the Python-ideas mailing list