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

Mark Dickinson report at bugs.python.org
Fri Jun 27 22:36:21 CEST 2008


Mark Dickinson <dickinsm at gmail.com> added the comment:

> 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).

Sounds good.  Some care might be needed to avoid invalidating
Fraction(n, d) where n and d are instances of numbers.Integral but not of 
type int or long.

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


More information about the Python-bugs-list mailing list