[Python-ideas] Disallow orderring comparison to NaN
Alexander Belopolsky
alexander.belopolsky at gmail.com
Thu Apr 28 21:25:42 CEST 2011
I posted a patch implementing this proposal on the tracker:
http://bugs.python.org/issue11949
Interestingly, the only substantive change that was needed to pass the
test suit revealed a bug in the test logic. The tests in
cmath_testcases.txt include testing for -0.0 results, but the
processing in test_math.py ignores the difference between 0.0 and
-0.0. For example, test_math will still pass if you make the
following change:
--- a/Lib/test/cmath_testcases.txt
+++ b/Lib/test/cmath_testcases.txt
@@ -405,7 +405,7 @@
-- zeros
asin0000 asin 0.0 0.0 -> 0.0 0.0
asin0001 asin 0.0 -0.0 -> 0.0 -0.0
-asin0002 asin -0.0 0.0 -> -0.0 0.0
+asin0002 asin -0.0 0.0 -> 0.0 0.0
asin0003 asin -0.0 -0.0 -> -0.0 -0.0
More information about the Python-ideas
mailing list