[Python-checkins] r60231 - python/trunk/Lib/rational.py
raymond.hettinger
python-checkins at python.org
Thu Jan 24 03:05:06 CET 2008
Author: raymond.hettinger
Date: Thu Jan 24 03:05:06 2008
New Revision: 60231
Modified:
python/trunk/Lib/rational.py
Log:
Cleanup
Modified: python/trunk/Lib/rational.py
==============================================================================
--- python/trunk/Lib/rational.py (original)
+++ python/trunk/Lib/rational.py Thu Jan 24 03:05:06 2008
@@ -179,9 +179,7 @@
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'
More information about the Python-checkins
mailing list