[issue1182] Paticular decimal mod operation wrongly output NaN.
Mark Dickinson
report at bugs.python.org
Tue Jan 8 21:17:33 CET 2008
Mark Dickinson added the comment:
Unfortunately, I think this backport still breaks hash:
bernoulli:~/python_source/release25-maint dickinsm$ ./python.exe
Python 2.5.2a0 (release25-maint:59859M, Jan 8 2008, 11:54:53)
[GCC 4.0.1 (Apple Computer, Inc. build 5370)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> from decimal import *
>>> x = Decimal("1.634E100")
>>> hash(x) == hash(int(x))
False
Do we really want to go from a slow-but-working Decimal.__hash__ in Python 2.5.1 to a fast-but-
broken hash in Python 2.5.2?
I can fix this (it's a 1-line change), and reinstate the extra hash tests, if you like. Or I can
post a patch if you prefer.
__________________________________
Tracker <report at bugs.python.org>
<http://bugs.python.org/issue1182>
__________________________________
More information about the Python-bugs-list
mailing list