#1726198: replace while 1: fp.readline() with file iteration.

This commit is contained in:
Georg Brandl 2008-01-21 17:22:06 +00:00
parent af67f303d8
commit 1ea8cb49ed
4 changed files with 4 additions and 14 deletions

View file

@ -306,9 +306,7 @@ def test():
except ImportError:
from StringIO import StringIO
fp = StringIO(test_input)
while 1:
line = fp.readline()
if not line: break
for line in fp:
words = line.split()
if not words:
continue