diff options
author | William Deegan <bill@baddogconsulting.com> | 2017-07-03 19:06:02 (GMT) |
---|---|---|
committer | William Deegan <bill@baddogconsulting.com> | 2017-07-03 19:06:02 (GMT) |
commit | bb7fd9c6b0348092a6825f3572b557c0b24dd4b5 (patch) | |
tree | eb91747534b7a368672058f7a82be71edcd17751 /bench | |
parent | 646d64748ab28dca9e30823ab6472e06cf9bd981 (diff) | |
download | SCons-bb7fd9c6b0348092a6825f3572b557c0b24dd4b5.zip SCons-bb7fd9c6b0348092a6825f3572b557c0b24dd4b5.tar.gz SCons-bb7fd9c6b0348092a6825f3572b557c0b24dd4b5.tar.bz2 |
Add an alternative to evaluate lvar vs gvar
Diffstat (limited to 'bench')
-rw-r--r-- | bench/lvars-gvars.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/bench/lvars-gvars.py b/bench/lvars-gvars.py index bdb09ef..1511203 100644 --- a/bench/lvars-gvars.py +++ b/bench/lvars-gvars.py @@ -45,6 +45,12 @@ def Func4(var, gvars, lvars): except NameError: x = '' +def Func5(var, gvars, lvars): + """Chained get with default values""" + for i in IterationList: + x = lvars.get(var,gvars.get(var,'')) + + # Data to pass to the functions on each run. Each entry is a # three-element tuple: # |