mirror of https://github.com/python/cpython
Remove duplicate call to strip method in Parser/pgen/token.py (GH-14938)
This commit is contained in:
parent
5380def826
commit
e018dc52d1
|
@ -6,9 +6,7 @@ def generate_tokens(tokens):
|
|||
for line in tokens:
|
||||
line = line.strip()
|
||||
|
||||
if not line:
|
||||
continue
|
||||
if line.strip().startswith('#'):
|
||||
if not line or line.startswith('#'):
|
||||
continue
|
||||
|
||||
name = line.split()[0]
|
||||
|
@ -22,9 +20,7 @@ def generate_opmap(tokens):
|
|||
for line in tokens:
|
||||
line = line.strip()
|
||||
|
||||
if not line:
|
||||
continue
|
||||
if line.strip().startswith('#'):
|
||||
if not line or line.startswith('#'):
|
||||
continue
|
||||
|
||||
pieces = line.split()
|
||||
|
|
Loading…
Reference in New Issue