summaryrefslogtreecommitdiffstats
path: root/Lib/fractions.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/fractions.py')
-rwxr-xr-xLib/fractions.py5
1 files changed, 2 insertions, 3 deletions
diff --git a/Lib/fractions.py b/Lib/fractions.py
index 329a16f..3df628a 100755
--- a/Lib/fractions.py
+++ b/Lib/fractions.py
@@ -94,9 +94,8 @@ class Fraction(numbers.Rational):
if denominator == 0:
raise ZeroDivisionError('Fraction(%s, 0)' % numerator)
-
- numerator = numerator.__index__()
- denominator = denominator.__index__()
+ numerator = operator.index(numerator)
+ denominator = operator.index(denominator)
g = gcd(numerator, denominator)
self._numerator = numerator // g
self._denominator = denominator // g