diff options
| author | Ulf Magnusson <ulfalizer@gmail.com> | 2016-08-07 00:09:30 +0200 |
|---|---|---|
| committer | Ulf Magnusson <ulfalizer@gmail.com> | 2016-08-07 00:09:30 +0200 |
| commit | 0b544365784e13277f1641c8eaa596c9ef8ff003 (patch) | |
| tree | b2050dba71ca7688a5265c164850bbc26a0c3a04 /kconfiglib.py | |
| parent | fc59c2f9c0054e2279a36f33ccea2438abd8b1f2 (diff) | |
Micro-optimize conditional in get_value()
Saves a few source lines as well as bytes of bytecode.
Diffstat (limited to 'kconfiglib.py')
| -rw-r--r-- | kconfiglib.py | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/kconfiglib.py b/kconfiglib.py index 23afdf5..e2a8763 100644 --- a/kconfiglib.py +++ b/kconfiglib.py @@ -1888,10 +1888,8 @@ class Symbol(Item): self.write_to_conf = (mode != "n") if mode == "y": - if choice.get_selection() is self: - new_val = "y" - else: - new_val = "n" + new_val = "y" if choice.get_selection() is self \ + else "n" elif mode == "m": if self.user_val == "m" or self.user_val == "y": new_val = "m" |
