Mensanator wrote:
On Apr 1, 9:44 pm, Steven D'Aprano <st...@remove-this-
cybersource.com.au> wrote:
<snip>
1/2.0
0.25

If you want an exact result when multiplying arbitrary fractions, you
need to avoid floats and decimals and use Fractions:

Fraction(1, 2)**2
Fraction(1, 4)

Where do you get that from?

In Python2.6,

from fractions import Fraction

And Fraction is now a class which supports fractional arithmetic.

--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to