summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRaymond Hettinger <python@rcn.com>2008-01-24 02:05:06 (GMT)
committerRaymond Hettinger <python@rcn.com>2008-01-24 02:05:06 (GMT)
commitf336c8b7e91f389c8af4255f589849b16ee3dcb5 (patch)
tree9531410e02c821b94da673e953cc88a600e56e6b
parenteb461904eb277c5a92a7d2672f941cb095cf1a93 (diff)
downloadcpython-f336c8b7e91f389c8af4255f589849b16ee3dcb5.zip
cpython-f336c8b7e91f389c8af4255f589849b16ee3dcb5.tar.gz
cpython-f336c8b7e91f389c8af4255f589849b16ee3dcb5.tar.bz2
Cleanup
-rwxr-xr-xLib/rational.py4
1 files changed, 1 insertions, 3 deletions
diff --git a/Lib/rational.py b/Lib/rational.py
index 070e593..e34a713 100755
--- a/Lib/rational.py
+++ b/Lib/rational.py
@@ -179,9 +179,7 @@ class Rational(RationalAbc):
for e in reversed(seq):
n, d = d, n
n += e * d
- if seq:
- return cls(n, d)
- return cls(0)
+ return cls(n, d) if seq else cls(0)
def as_continued_fraction(self):
'Return continued fraction expressed as a list'