From 419d9a83d5688940b3dbb410029080ad7f2f71a8 Mon Sep 17 00:00:00 2001 From: Benjamin Peterson Date: Sun, 10 Feb 2013 09:48:22 -0500 Subject: evaluate lambda keyword-only defaults after positional defaults (#16967 again) --- Python/compile.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'Python/compile.c') diff --git a/Python/compile.c b/Python/compile.c index a0df40c3233..61f35f82cd7 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; -- cgit v1.2.3