mirror of
https://github.com/python/cpython.git
synced 2025-09-26 10:19:53 +00:00
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.
This commit is contained in:
parent
6eba779235
commit
99d8096c17
4 changed files with 74 additions and 13 deletions
|
@ -35,6 +35,11 @@ Core and Builtins
|
|||
Library
|
||||
-------
|
||||
|
||||
- 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).
|
||||
|
||||
- Issue #8233: When run as a script, py_compile.py optionally takes a single
|
||||
argument `-` which tells it to read files to compile from stdin. Each line
|
||||
is read on demand and the named file is compiled immediately. (Original
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue