Message135983
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. |
|
Date |
User |
Action |
Args |
2011-05-14 18:50:33 | mark.dickinson | set | recipients:
+ mark.dickinson, rhettinger, belopolsky, alex, daniel.urban |
2011-05-14 18:50:33 | mark.dickinson | set | messageid: <1305399033.28.0.945166541094.issue11949@psf.upfronthosting.co.za> |
2011-05-14 18:50:32 | mark.dickinson | link | issue11949 messages |
2011-05-14 18:50:32 | mark.dickinson | create | |
|