Mark Dickinson <dicki...@gmail.com> added the comment:

It seems we're getting a bit off-topic for the issue title;  the discussion 
about cleaning up test_math (which I agree would be a good thing to do) should 
probably go into another issue.

On the issue itself, I'm -1 on making comparisons with float('nan') raise: I 
don't see that there's a real problem here that needs solving.  

Note that the current behaviour does *not* violate IEEE 754, since there's 
nothing anywhere in IEEE 754 that says that Python's < operation should raise 
for comparisons involving NaNs:  all that's said is that a conforming language 
should provide a number of comparison operations (without specifying how those 
operation should be spelt in the language in question), including both a < 
operation that's quiet (returning a false value for comparison with NaNs) and a 
< operation that signals on comparison with NaN.  There's nothing to indicate 
definitively which of these two operations '<' should bind to in a language.

It *is* true that C chooses to bind '<' to the signalling version, but that 
doesn't automatically mean that we should do the same in Python.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue11949>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to