Skip to content

Commit

Permalink
Remove duplicate call to strip method in Parser/pgen/token.py (python…
Browse files Browse the repository at this point in the history
  • Loading branch information
hansrajdas authored and pablogsal committed Jul 24, 2019
1 parent 5380def commit e018dc5
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions Parser/pgen/token.py
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand All @@ -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()
Expand Down

0 comments on commit e018dc5

Please sign in to comment.