Mark Dickinson <dicki...@gmail.com> added the comment: Here's a patch:
- comparisons between a Decimal and float produce a result based on the numeric values of the Decimal and float - change Decimal.__hash__ so that floats and Decimals with (exactly) equal value have the same hash. This preserves the rule that if two objects compare equal then they hash equal. - add tests, and update documentation. Still open: should this change be forward ported to py3k? If not, then these comparisons should produce a DeprecationWarning. ---------- Added file: http://bugs.python.org/file16544/issue2531.patch _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue2531> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com