diff options
author | Mark Dickinson <dickinsm@gmail.com> | 2010-03-27 11:11:13 (GMT) |
---|---|---|
committer | Mark Dickinson <dickinsm@gmail.com> | 2010-03-27 11:11:13 (GMT) |
commit | 327f02c60c7567b6a5d337111f231992bd3c5338 (patch) | |
tree | a1426b5e5c2f82482656ac834e10465157c71912 /Lib/fractions.py | |
parent | e6be10990dec9f5b4d3216501614e3af2998568c (diff) | |
download | cpython-327f02c60c7567b6a5d337111f231992bd3c5338.zip cpython-327f02c60c7567b6a5d337111f231992bd3c5338.tar.gz cpython-327f02c60c7567b6a5d337111f231992bd3c5338.tar.bz2 |
Merged revisions 79455 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk
........
r79455 | mark.dickinson | 2010-03-27 11:09:29 +0000 (Sat, 27 Mar 2010) | 2 lines
Make Fraction to complex comparisons with <=, <, >= or > raise TypeError.
........
Diffstat (limited to 'Lib/fractions.py')
-rw-r--r-- | Lib/fractions.py | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/Lib/fractions.py b/Lib/fractions.py index 27b27f4..9624c90 100644 --- a/Lib/fractions.py +++ b/Lib/fractions.py @@ -526,8 +526,6 @@ class Fraction(numbers.Rational): if isinstance(other, numbers.Rational): return op(self._numerator * other.denominator, self._denominator * other.numerator) - if isinstance(other, numbers.Complex) and other.imag == 0: - other = other.real if isinstance(other, float): if math.isnan(other) or math.isinf(other): return op(0.0, other) |