This commit is contained in:
Raymond Hettinger 2008-01-24 02:05:06 +00:00
parent eb461904eb
commit f336c8b7e9
1 changed files with 1 additions and 3 deletions

View File

@ -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'