diff options
author | Benjamin Peterson <benjamin@python.org> | 2013-02-10 14:48:22 (GMT) |
---|---|---|
committer | Benjamin Peterson <benjamin@python.org> | 2013-02-10 14:48:22 (GMT) |
commit | 419d9a83d5688940b3dbb410029080ad7f2f71a8 (patch) | |
tree | 2608b28d9ba829e1c533a27bfa645ba94f478291 /Python/compile.c | |
parent | 8b466c99329c0d422a48acfae0c20ec1e76ef314 (diff) | |
download | cpython-419d9a83d5688940b3dbb410029080ad7f2f71a8.zip cpython-419d9a83d5688940b3dbb410029080ad7f2f71a8.tar.gz cpython-419d9a83d5688940b3dbb410029080ad7f2f71a8.tar.bz2 |
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 a0df40c..61f35f8 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; |