This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

作者 mark.dickinson
收信人 adamtj, bas, bertchughes, facundobatista, jdunck, lorg, mark.dickinson, rhettinger, skrah
日期 2010-03-14.11:52:31
SpamBayes Score 0.00031190625
Marked as misclassified
Message-id <1268567555.69.0.719750194829.issue2531@psf.upfronthosting.co.za>
In-reply-to
内容
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:36mark.dickinson修改recipients: + mark.dickinson, rhettinger, facundobatista, jdunck, lorg, skrah, adamtj, bertchughes, bas
2010-03-14 11:52:35mark.dickinson修改messageid: <1268567555.69.0.719750194829.issue2531@psf.upfronthosting.co.za>
2010-03-14 11:52:33mark.dickinson链接issue2531 messages
2010-03-14 11:52:33mark.dickinson创建