消息 [101053]
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. |
|
| 日期 |
用户 |
动作 |
参数 |
| 2010-03-14 11:52:36 | mark.dickinson | 修改 | recipients:
+ mark.dickinson, rhettinger, facundobatista, jdunck, lorg, skrah, adamtj, bertchughes, bas |
| 2010-03-14 11:52:35 | mark.dickinson | 修改 | messageid: <1268567555.69.0.719750194829.issue2531@psf.upfronthosting.co.za> |
| 2010-03-14 11:52:33 | mark.dickinson | 链接 | issue2531 messages |
| 2010-03-14 11:52:33 | mark.dickinson | 创建 | |
|