[Edu-sig] computer algebra

kirby urner kirby.urner at gmail.com
Mon Dec 15 01:05:36 CET 2008


Ah so...

My focus on the constructor as a way to trigger the initial division
(complete with gcd), was blinding me to the role of the __div__
operator in gluing the things together.  I need to get back to those
continued fraction studies then, using my new understanding.

Thank you for opening my eyes Guido.

Kirby

On Sun, Dec 14, 2008 at 3:39 PM, Guido van Rossum <guido at python.org> wrote:
> But fractions *can* eat fractions. Instead of Fraction(f1, f2) you
> just write f1/f2. In general you should just stick to the latter, and
> leave the Fraction() constructor for when the / operator would pick a
> different type (as in 1/2, which becomes a float). You can also write
> it as Fraction(1) / Fraction(2).
>
> --Guido van Rossum (home page: http://www.python.org/~guido/)
>


More information about the Edu-sig mailing list