Author mark.dickinson
Recipients facundobatista, jdunck, lorg, mark.dickinson, rhettinger
Date 2009-03-21.11:08:00
SpamBayes Score 5.90961e-10
Marked as misclassified No
Message-id <1237633683.45.0.60745713648.issue2531@psf.upfronthosting.co.za>
In-reply-to
Content
> 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?
History
Date User Action Args
2009-03-21 11:08:03mark.dickinsonsetrecipients: + mark.dickinson, rhettinger, facundobatista, jdunck, lorg
2009-03-21 11:08:03mark.dickinsonsetmessageid: <1237633683.45.0.60745713648.issue2531@psf.upfronthosting.co.za>
2009-03-21 11:08:01mark.dickinsonlinkissue2531 messages
2009-03-21 11:08:00mark.dickinsoncreate