mirror of
https://github.com/python/cpython.git
synced 2025-09-01 06:28:36 +00:00
evaluate lambda keyword-only defaults after positional defaults (#16967 again)
This commit is contained in:
parent
8b466c9932
commit
419d9a83d5
4 changed files with 9 additions and 5 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue