Conditional operator in Python?

Tim Peters tim.one at home.com
Fri Apr 6 18:08:16 EDT 2001


> OTOH, trailing zeroes can be useful in real-world arithmetic, and
> the REXX language defines (e.g.) 4.73 - 1.03 to be 3.70, not 3.7,
> and way not 3.7000000000000002.  I'm going to inflict that on
> Python someday.

[Grant Edwards]
> Geez, like we don't have enough confused FP users today.
> I can just imagine the postings:
>
>   Why does 1.12345678 * 3 == 3 ?

It wouldn't.  Read the spec, if you care:

    http://www2.hursley.ibm.com/decimal/





More information about the Python-list mailing list