]> granicus.if.org Git - python/commit
Issue #7279: Make Decimal('nan') hashable. Decimal('snan') remains unhashable.
authorMark Dickinson <dickinsm@gmail.com>
Fri, 2 Apr 2010 10:35:12 +0000 (10:35 +0000)
committerMark Dickinson <dickinsm@gmail.com>
Fri, 2 Apr 2010 10:35:12 +0000 (10:35 +0000)
commitf3eeca16cbadd7da5836ed781572343863b1a074
tree14fc31b72773122d3c13f7e72cbdb57b28365e05
parente096e82e827f6092706c7349fd4944c275382eb5
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.
Lib/decimal.py
Lib/test/test_decimal.py
Misc/NEWS