Commit e018dc52 authored by Hansraj Das's avatar Hansraj Das Committed by Pablo Galindo

Remove duplicate call to strip method in Parser/pgen/token.py (GH-14938)

parent 5380def8
...@@ -6,9 +6,7 @@ def generate_tokens(tokens): ...@@ -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): ...@@ -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()
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment