diff options
author | Benjamin Peterson <benjamin@python.org> | 2013-02-10 09:48:22 -0500 |
---|---|---|
committer | Benjamin Peterson <benjamin@python.org> | 2013-02-10 09:48:22 -0500 |
commit | 7ca707eaa6c4fb73690a0ef904261a63fd0c6385 (patch) | |
tree | 88390c757c937290db0c6ac4a9f2b8a90f243d31 /Python/compile.c | |
parent | 7738901ab7816a8941ca59dac867f8d09e85dd9b (diff) | |
download | cpython-7ca707eaa6c4fb73690a0ef904261a63fd0c6385.tar.gz |
evaluate lambda keyword-only defaults after positional defaults (#16967 again)
Diffstat (limited to 'Python/compile.c')
-rw-r--r-- | Python/compile.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Python/compile.c b/Python/compile.c index a0df40c323..61f35f82cd 100644 --- a/Python/compile.c +++ b/Python/compile.c @@ -1794,14 +1794,14 @@ compiler_lambda(struct compiler *c, expr_ty e) return 0; } + if (args->defaults) + VISIT_SEQ(c, expr, args->defaults); if (args->kwonlyargs) { int res = compiler_visit_kwonlydefaults(c, args->kwonlyargs, args->kw_defaults); if (res < 0) return 0; kw_default_count = res; } - if (args->defaults) - VISIT_SEQ(c, expr, args->defaults); if (!compiler_enter_scope(c, name, COMPILER_SCOPE_FUNCTION, (void *)e, e->lineno)) return 0; |