From b2e85a8b838b2e8b6b0396609828ecd40ae1447f Mon Sep 17 00:00:00 2001 From: George Edward Bulmer Date: Sun, 11 Feb 2018 16:33:26 +0000 Subject: [PATCH] Simplify to lambda with default argument --- qutebrowser/commands/runners.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/qutebrowser/commands/runners.py b/qutebrowser/commands/runners.py index 965f4a6b6..0171f6c37 100644 --- a/qutebrowser/commands/runners.py +++ b/qutebrowser/commands/runners.py @@ -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',