commit | fe427895b58769840f1f61a82ea0cdfe55150347 | [log] [tgz] |
---|---|---|
author | Georg Brandl <georg@python.org> | Sat Jan 03 22:03:11 2009 +0000 |
committer | Georg Brandl <georg@python.org> | Sat Jan 03 22:03:11 2009 +0000 |
tree | ba6fc9493239a122199292caada1e9345d26e8f6 | |
parent | c63785db867804de8b676ddddcc90c3fcbf2c111 [diff] [blame] |
Manually merge r68095,68186,68187,68188,68190 from 2.6 branch.
diff --git a/Lib/fractions.py b/Lib/fractions.py index 4adb184..446ad8e 100755 --- a/Lib/fractions.py +++ b/Lib/fractions.py
@@ -111,7 +111,7 @@ """ if isinstance(f, numbers.Integral): - f = float(f) + return cls(f) elif not isinstance(f, float): raise TypeError("%s.from_float() only takes floats, not %r (%s)" % (cls.__name__, f, type(f).__name__))