mirror of
https://github.com/python/cpython.git
synced 2025-11-25 04:34:37 +00:00
Replace str.find()!=1 with the more readable "in" operator.
This commit is contained in:
parent
c5e378da41
commit
bac788a3cd
7 changed files with 9 additions and 9 deletions
|
|
@ -63,7 +63,7 @@ def main():
|
|||
while 1:
|
||||
line = fp.readline()
|
||||
if not line: break
|
||||
if line.find('{1, "') > -1:
|
||||
if '{1, "' in line:
|
||||
match = strprog.search(line)
|
||||
if match:
|
||||
lines.append(" '" + match.group(1) + "',\n")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue