[Python-Dev] Weekly Python Bug/Patch Summary

Tim Peters tim.one at comcast.net
Thu Feb 19 13:52:49 EST 2004


[Michael Hudson]
>>> Would it make (more) sense to implement rich comparisons for floats?

[Tim]
>> Not much.

[Michael]
> But a little bit?  It might at least make the results closer to what
> the underlying C compiler does (modulo bugs in same, of course).

The intended behavior of NaNs is covered precisely by standards.  Moving
Python's nonsense behavior closer to the platform C's nonsense behavior
doesn't scream "useful" to me.  But I don't object to it either, if someone
can't think of something better to do with their time <wink>.  At least gcc
users would get something much closer to what the standard intends (although
their Python wouldn't be portable in these respects).  OTOH, by pure
accident, NaN==NaN *happens* to return the intended False today under
Windows Python, and if that's changed, via rich comparison, to return True
(which MSVC returns for the C expression NaN==NaN), then we've also managed
to break currently-working code on Windows.  754 really isn't friendly to
half-assed support.




More information about the Python-Dev mailing list