Author bertchughes
Recipients adamtj, bertchughes, facundobatista, jdunck, lorg, mark.dickinson, rhettinger
Date 2010-01-16.18:24:35
SpamBayes Score 3.60401e-12
Marked as misclassified No
Message-id <1263666277.58.0.772311276525.issue2531@psf.upfronthosting.co.za>
In-reply-to
Content
Expressions like "Decimal('100.0') < .01" being silently wrong (True!) is *very* dangerous behavior, it should raise exception like any other Decimal-float operation, and hopefully will be back-ported to 2.7. 

Eg: 3rd party module kinterbasdb, which provides access to Firebird database, returns floats from firebird large-int types (eg NUMERIC 18,2) in versions of kinrebasdb 3.2 or less, but in versions 3.3+ kinterbasdb retrieves large-int as type Decimal. This means if python/kinterbasdb users upgrade kinterbasdb they must be aware of this python bug, because all existing code must be inspected for "(retrieved Decimal value) compare (float)" statements, which before upgrade were Ok (retrieved float value) compare (float)) statements.

I'm new to this tracker, I hope this simply is added as an additional comment & squawk of dismay to the "float compared to decimal is silently incorrec" issue.
History
Date User Action Args
2010-01-16 18:24:38bertchughessetrecipients: + bertchughes, rhettinger, facundobatista, mark.dickinson, jdunck, lorg, adamtj
2010-01-16 18:24:37bertchughessetmessageid: <1263666277.58.0.772311276525.issue2531@psf.upfronthosting.co.za>
2010-01-16 18:24:36bertchugheslinkissue2531 messages
2010-01-16 18:24:35bertchughescreate