[Python-Dev] Decimal & lt; -& gt; float comparisons in py3k. (original) (raw)
Greg Ewing greg.ewing at canterbury.ac.nz
Sat Mar 20 02:22:16 CET 2010
- Previous message: [Python-Dev] Decimal & amp; lt; -& amp; gt; float comparisons in py3k.
- Next message: [Python-Dev] Decimal <-> float comparisons in py3k.
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Glenn Linderman wrote:
In order to do implicit comparisons, one must do an implicit coercion. Hence the PEP actually already prohibits implicit comparisons, as well as implicit arithmetic.
Not necessarily -- you could compare them as though they had both been converted to the equivalent rational numbers, which can be done without loss of precision.
-- Greg
- Previous message: [Python-Dev] Decimal & amp; lt; -& amp; gt; float comparisons in py3k.
- Next message: [Python-Dev] Decimal <-> float comparisons in py3k.
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]