Simplify to lambda with default argument
This commit is contained in:
parent
7c0832daf2
commit
b2e85a8b83
@ -68,11 +68,7 @@ def replace_variables(win_id, arglist):
|
||||
}
|
||||
for key in list(variables):
|
||||
modified_key = '{' + key + '}'
|
||||
|
||||
def key_function(modified_key):
|
||||
return lambda: modified_key
|
||||
|
||||
variables[modified_key] = key_function(modified_key)
|
||||
variables[modified_key] = lambda x=modified_key: x
|
||||
values = {}
|
||||
args = []
|
||||
tabbed_browser = objreg.get('tabbed-browser', scope='window',
|
||||
|
Loading…
Reference in New Issue
Block a user