summaryrefslogtreecommitdiff
path: root/kconfiglib.py
diff options
context:
space:
mode:
authorUlf Magnusson <ulfalizer@gmail.com>2018-01-16 17:54:16 +0100
committerUlf Magnusson <ulfalizer@gmail.com>2018-01-16 18:14:55 +0100
commit5f18eb738a34994a8e74d65fb9fa17b31f2919bc (patch)
tree3b9d257380228cf41dc686869aca38a2e94362c8 /kconfiglib.py
parent3264cea4ef05950d2e931f086ad7bbe232fe87cb (diff)
_tokenize() non-constant symbol parsing style nit
Saves a tiny bit of bytecode too.
Diffstat (limited to 'kconfiglib.py')
-rw-r--r--kconfiglib.py14
1 files changed, 6 insertions, 8 deletions
diff --git a/kconfiglib.py b/kconfiglib.py
index f2236e2..960f75e 100644
--- a/kconfiglib.py
+++ b/kconfiglib.py
@@ -1271,14 +1271,12 @@ class Kconfig(object):
token = keyword
elif token not in _STRING_LEX:
- # It's a non-const symbol...
- if name in ("n", "m", "y"):
- # ...except we translate n, m, and y into the
- # corresponding constant symbols, like the C
- # implementation
- token = self.const_syms[name]
- else:
- token = self._lookup_sym(name)
+ # It's a non-const symbol, except we translate n, m, and y
+ # into the corresponding constant symbols, like the C
+ # implementation
+ token = self.const_syms[name] \
+ if name in ("n", "m", "y") else \
+ self._lookup_sym(name)
else:
# It's a case of missing quotes. For example, the