mirror of
https://github.com/python/cpython.git
synced 2025-11-25 21:11:09 +00:00
#1726198: replace while 1: fp.readline() with file iteration.
This commit is contained in:
parent
af67f303d8
commit
1ea8cb49ed
4 changed files with 4 additions and 14 deletions
|
|
@ -50,10 +50,7 @@ class ColorDB:
|
|||
self.__byname = {}
|
||||
# all unique names (non-aliases). built-on demand
|
||||
self.__allnames = None
|
||||
while 1:
|
||||
line = fp.readline()
|
||||
if not line:
|
||||
break
|
||||
for line in fp:
|
||||
# get this compiled regular expression from derived class
|
||||
mo = self._re.match(line)
|
||||
if not mo:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue