#1726198: replace while 1: fp.readline() with file iteration.
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 @@
     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: