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.
3 files changed