commit | 1ea8cb49ed728dadec11d0a554431c566fdc5a56 | [log] [tgz] |
---|---|---|
author | Georg Brandl <georg@python.org> | Mon Jan 21 17:22:06 2008 +0000 |
committer | Georg Brandl <georg@python.org> | Mon Jan 21 17:22:06 2008 +0000 |
tree | c4e487e2d224711791204e45e7bd9e2acc36b5a1 | |
parent | af67f303d8077b3b08e4baa03feae5f618fae757 [diff] [blame] |
#1726198: replace while 1: fp.readline() with file iteration.
diff --git a/Lib/formatter.py b/Lib/formatter.py index fa2b389..834b560 100644 --- a/Lib/formatter.py +++ b/Lib/formatter.py
@@ -432,10 +432,7 @@ fp = open(sys.argv[1]) else: fp = sys.stdin - while 1: - line = fp.readline() - if not line: - break + for line in fp: if line == '\n': f.end_paragraph(1) else: