Message83935
> My complaint is that it is silently wrong.
I appreciate that, but I don't see any good solution. Yes, it would be
nice if float <-> Decimal comparisons raised TypeError in 2.x. But Python
2.x has an '(almost) everything is comparable to everything else'
comparison model, so that for example a list of arbitrary Python objects
can almost always be sorted. So raising a TypeError for these comparisons
has the potential to break already existing code. Of course, it *might*
not cause any breakage at all, but it's difficult to see how one could
ever be sure of that.
I think the best we can do would be to add a warning for float <-> Decimal
comparisons. Facundo, Raymond: does this seem reasonable? |
|
Date |
User |
Action |
Args |
2009-03-21 11:08:03 | mark.dickinson | set | recipients:
+ mark.dickinson, rhettinger, facundobatista, jdunck, lorg |
2009-03-21 11:08:03 | mark.dickinson | set | messageid: <1237633683.45.0.60745713648.issue2531@psf.upfronthosting.co.za> |
2009-03-21 11:08:01 | mark.dickinson | link | issue2531 messages |
2009-03-21 11:08:00 | mark.dickinson | create | |
|