diff options
author | Mark Dickinson <dickinsm@gmail.com> | 2010-04-03 11:08:14 (GMT) |
---|---|---|
committer | Mark Dickinson <dickinsm@gmail.com> | 2010-04-03 11:08:14 (GMT) |
commit | ac256ab2843dfb6c28af0227202df67664ed462e (patch) | |
tree | e4b82bd27da37911a04fde01cc06e7ddc39681df /Misc | |
parent | 5fc16b469ea96f1db11bb2fc9996ac056e8e1c3c (diff) | |
download | cpython-ac256ab2843dfb6c28af0227202df67664ed462e.zip cpython-ac256ab2843dfb6c28af0227202df67664ed462e.tar.gz cpython-ac256ab2843dfb6c28af0227202df67664ed462e.tar.bz2 |
Merged revisions 79583,79588-79589 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk
........
r79583 | mark.dickinson | 2010-04-02 09:53:22 +0100 (Fri, 02 Apr 2010) | 7 lines
Issue #2531: Make float-to-decimal comparisons return correct results.
Float to decimal comparison operations now return a result based on
the numeric values of the operands. Decimal.__hash__ has also been
fixed so that Decimal and float values that compare equal have equal
hash value.
........
r79588 | mark.dickinson | 2010-04-02 11:17:07 +0100 (Fri, 02 Apr 2010) | 2 lines
Issue #7279: Make comparisons involving a Decimal sNaN signal InvalidOperation.
........
r79589 | mark.dickinson | 2010-04-02 11:35:12 +0100 (Fri, 02 Apr 2010) | 6 lines
Issue #7279: Make Decimal('nan') hashable. Decimal('snan') remains unhashable.
Also rewrite the Decimal __hash__ method so that it doesn't rely on
float('inf') being valid: float('inf') could raise an exception on
platforms not using IEEE 754 arithmetic.
........
Diffstat (limited to 'Misc')
-rw-r--r-- | Misc/NEWS | 10 |
1 files changed, 10 insertions, 0 deletions
@@ -301,6 +301,16 @@ C-API Library ------- +- Issue #7279: Comparisons involving a Decimal signaling NaN now + signal InvalidOperation instead of returning False. (Comparisons + involving a quiet NaN are unchanged.) Also, Decimal quiet NaNs + are now hashable; Decimal signaling NaNs remain unhashable. + +- Issue #2531: Comparison operations between floats and Decimal + instances now return a result based on the numeric values of the + operands; previously they returned an arbitrary result based on + the relative ordering of id(float) and id(Decimal). + - Added a subtract() method to collections.Counter(). - Issue #8233: When run as a script, py_compile.py optionally takes a single |