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

Jeffrey Yasskin report at bugs.python.org
Thu Feb 14 18:47:19 CET 2008


Jeffrey Yasskin added the comment:

Thanks for writing the __add__ optimization down. I hadn't realized how
simple it was. I think both optimizations are worth it. 22% on a rarely
used class is worth 24 lines of python, and I think nearly eliminating
the overhead of ABCs (which will prevent them from getting a bad
performance reputation) is worth some C.

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


More information about the Python-bugs-list mailing list