[Python-checkins] Remove duplicate call to strip method in Parser/pgen/token.py (GH-14938)
Pablo Galindo
webhook-mailer at python.org
Wed Jul 24 16:31:46 EDT 2019
https://github.com/python/cpython/commit/e018dc52d1268bc0c5e4037c132e463f1a4002af
commit: e018dc52d1268bc0c5e4037c132e463f1a4002af
branch: master
author: Hansraj Das <raj.das.136 at gmail.com>
committer: Pablo Galindo <Pablogsal at gmail.com>
date: 2019-07-24T21:31:19+01:00
summary:
Remove duplicate call to strip method in Parser/pgen/token.py (GH-14938)
files:
M Parser/pgen/token.py
diff --git a/Parser/pgen/token.py b/Parser/pgen/token.py
index 008e241e175e..e7e8f3f1b661 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()
More information about the Python-checkins
mailing list