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

Guido van Rossum report at bugs.python.org
Fri Jun 27 20:51:09 CEST 2008


Guido van Rossum <guido at python.org> added the comment:

I think it's okay to accept Fraction('1.23', 1) -- if only because
rejecting it means changing the default for the 2nd arg to None and that
would slow it down again.

I agree that if the type of the 2nd arg isn't int or long it should be
rejected. That should not slow down the common path (two ints).

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue1682>
_______________________________________


More information about the Python-bugs-list mailing list