summaryrefslogtreecommitdiffstats
path: root/Parser/pgen
diff options
context:
space:
mode:
authorHansraj Das <raj.das.136@gmail.com>2019-07-24 20:31:19 (GMT)
committerPablo Galindo <Pablogsal@gmail.com>2019-07-24 20:31:19 (GMT)
commite018dc52d1268bc0c5e4037c132e463f1a4002af (patch)
tree9ce63770db50999c6cdd19bb524ff9915c6d296d /Parser/pgen
parent5380def8269b24a8a3bc46396373a1dc91b1dd1a (diff)
downloadcpython-e018dc52d1268bc0c5e4037c132e463f1a4002af.zip
cpython-e018dc52d1268bc0c5e4037c132e463f1a4002af.tar.gz
cpython-e018dc52d1268bc0c5e4037c132e463f1a4002af.tar.bz2
Remove duplicate call to strip method in Parser/pgen/token.py (GH-14938)
Diffstat (limited to 'Parser/pgen')
-rw-r--r--Parser/pgen/token.py8
1 files changed, 2 insertions, 6 deletions
diff --git a/Parser/pgen/token.py b/Parser/pgen/token.py
index 008e241..e7e8f3f 100644
--- a/Parser/pgen/token.py
+++ b/Parser/pgen/token.py
@@ -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()