Message59516
Some more comments:
(1) I don't think I understand the mechanism by which __lt__ and __le__ are supposed to
be called. For example, by adding a few print statements it seems that the comparison
Decimal(2) > 3
doesn't call __lt__ at any stage. Is this what's expected, or is this unintended?
(2) Also on the subject of __le__ and __lt__: if Decimal is going to have rich
comparisons (and I guess it is, one way or another :) ) then we might as well get them
right for NaNs: IEEE-754(r) says that any comparison involving NaN should return False,
with the exception of != which should always return True. With 3-way comparison it
wasn't possible to get this right. This would fix Issue 1514428. (Further discussion of
this should probably go there---I don't think it should hold up applying this patch...)
(3) I'm getting a serious performance hit from this patch: a complete run of
test_decimal.py costs me 22.439 seconds (best of 3) with the patch, and 11.604 seconds
without. I'm not sure where this is coming from---perhaps it's unavoidable. |
|
| Date |
User |
Action |
Args |
| 2008-01-08 02:30:53 | mark.dickinson | set | spambayes_score: 0.0228644 -> 0.0228644 recipients:
+ mark.dickinson, gvanrossum, facundobatista, jyasskin |
| 2008-01-08 02:30:53 | mark.dickinson | set | spambayes_score: 0.0228644 -> 0.0228644 messageid: <1199759453.71.0.975990532657.issue1623@psf.upfronthosting.co.za> |
| 2008-01-08 02:30:52 | mark.dickinson | link | issue1623 messages |
| 2008-01-08 02:30:51 | mark.dickinson | create | |
|