mirror of
https://github.com/python/cpython.git
synced 2025-11-11 14:44:57 +00:00
Remove duplicate call to strip method in Parser/pgen/token.py (GH-14938)
This commit is contained in:
parent
5380def826
commit
e018dc52d1
1 changed files with 2 additions and 6 deletions
|
|
@ -6,9 +6,7 @@ def generate_tokens(tokens):
|
||||||
for line in tokens:
|
for line in tokens:
|
||||||
line = line.strip()
|
line = line.strip()
|
||||||
|
|
||||||
if not line:
|
if not line or line.startswith('#'):
|
||||||
continue
|
|
||||||
if line.strip().startswith('#'):
|
|
||||||
continue
|
continue
|
||||||
|
|
||||||
name = line.split()[0]
|
name = line.split()[0]
|
||||||
|
|
@ -22,9 +20,7 @@ def generate_opmap(tokens):
|
||||||
for line in tokens:
|
for line in tokens:
|
||||||
line = line.strip()
|
line = line.strip()
|
||||||
|
|
||||||
if not line:
|
if not line or line.startswith('#'):
|
||||||
continue
|
|
||||||
if line.strip().startswith('#'):
|
|
||||||
continue
|
continue
|
||||||
|
|
||||||
pieces = line.split()
|
pieces = line.split()
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue