mirror of
https://github.com/python/cpython.git
synced 2025-07-08 03:45:36 +00:00
Issue #13343: Fix a SystemError when a lambda expression uses a global
variable in the default value of a keyword-only argument: (lambda *, arg=GLOBAL_NAME: None)
This commit is contained in:
commit
9028a10144
3 changed files with 15 additions and 0 deletions
|
@ -1300,6 +1300,9 @@ symtable_visit_expr(struct symtable *st, expr_ty e)
|
|||
return 0;
|
||||
if (e->v.Lambda.args->defaults)
|
||||
VISIT_SEQ(st, expr, e->v.Lambda.args->defaults);
|
||||
if (e->v.Lambda.args->kw_defaults)
|
||||
VISIT_KWONLYDEFAULTS(st,
|
||||
e->v.Lambda.args->kw_defaults);
|
||||
if (!symtable_enter_block(st, lambda,
|
||||
FunctionBlock, (void *)e, e->lineno,
|
||||
e->col_offset))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue