Simplify to lambda with default argument

This commit is contained in:
George Edward Bulmer 2018-02-11 16:33:26 +00:00
parent 7c0832daf2
commit b2e85a8b83

View File

@ -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',