[issue1682] Move Demo/classes/Rat.py to Lib/fractions.py and fix it up.

Jeffrey Yasskin report at bugs.python.org
Fri Feb 29 07:37:28 CET 2008


Jeffrey Yasskin added the comment:

I agree that we're basically done here. I'm back to -1 on inlining the
common case for arithmetic (attached here anyway). Simple cases are
already pretty fast, and bigger fractions are dominated by gcd time, not
function call overhead. Since duplicating the definitions of arithmetic
will make it harder to do tricky things that shrink the arguments to
gcd(), we shouldn't do it.

I was always +0 to __format__, so not doing it is fine with me.

Thanks for everyone's help!

----------
resolution:  -> fixed
status: open -> closed
Added file: http://bugs.python.org/file9570/fraction_inline_arith.patch

__________________________________
Tracker <report at bugs.python.org>
<http://bugs.python.org/issue1682>
__________________________________


More information about the Python-bugs-list mailing list