Message101053
| Author | mark.dickinson |
|---|---|
| Recipients | adamtj, bas, bertchughes, facundobatista, jdunck, lorg, mark.dickinson, rhettinger, skrah |
| Date | 2010-03-14.11:52:31 |
| SpamBayes Score | 0.00031190625 |
| Marked as misclassified | No |
| Message-id | <1268567555.69.0.719750194829.issue2531@psf.upfronthosting.co.za> |
| In-reply-to |
| Content | |
|---|---|
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. |
|
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2010-03-14 11:52:36 | mark.dickinson | set | recipients: + mark.dickinson, rhettinger, facundobatista, jdunck, lorg, skrah, adamtj, bertchughes, bas |
| 2010-03-14 11:52:35 | mark.dickinson | set | messageid: <1268567555.69.0.719750194829.issue2531@psf.upfronthosting.co.za> |
| 2010-03-14 11:52:33 | mark.dickinson | link | issue2531 messages |
| 2010-03-14 11:52:33 | mark.dickinson | create | |