mirror of
https://github.com/python/cpython.git
synced 2025-11-01 18:51:43 +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:
|
||||
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…
Add table
Add a link
Reference in a new issue