summaryrefslogtreecommitdiffstats
path: root/Lib/keyword.py
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2008-01-21 17:22:06 (GMT)
committerGeorg Brandl <georg@python.org>2008-01-21 17:22:06 (GMT)
commit1ea8cb49ed728dadec11d0a554431c566fdc5a56 (patch)
treec4e487e2d224711791204e45e7bd9e2acc36b5a1 /Lib/keyword.py
parentaf67f303d8077b3b08e4baa03feae5f618fae757 (diff)
downloadcpython-1ea8cb49ed728dadec11d0a554431c566fdc5a56.zip
cpython-1ea8cb49ed728dadec11d0a554431c566fdc5a56.tar.gz
cpython-1ea8cb49ed728dadec11d0a554431c566fdc5a56.tar.bz2
#1726198: replace while 1: fp.readline() with file iteration.
Diffstat (limited to 'Lib/keyword.py')
-rwxr-xr-xLib/keyword.py4
1 files changed, 1 insertions, 3 deletions
diff --git a/Lib/keyword.py b/Lib/keyword.py
index cd1d55e..8eb2860 100755
--- a/Lib/keyword.py
+++ b/Lib/keyword.py
@@ -62,9 +62,7 @@ def main():
fp = open(iptfile)
strprog = re.compile('"([^"]+)"')
lines = []
- while 1:
- line = fp.readline()
- if not line: break
+ for line in fp:
if '{1, "' in line:
match = strprog.search(line)
if match: