diff options
author | Amaury Forgeot d'Arc <amauryfa@gmail.com> | 2011-11-04 21:17:45 (GMT) |
---|---|---|
committer | Amaury Forgeot d'Arc <amauryfa@gmail.com> | 2011-11-04 21:17:45 (GMT) |
commit | 97c1bef6a4f3c522826386480c62ec27fe46301d (patch) | |
tree | ad74de7776f27145f7341dfe24ca961e5267603d /Python/symtable.c | |
parent | 3c85fe07f40a18d9f5733e85b213a6992c5b2ed4 (diff) | |
download | cpython-97c1bef6a4f3c522826386480c62ec27fe46301d.zip cpython-97c1bef6a4f3c522826386480c62ec27fe46301d.tar.gz cpython-97c1bef6a4f3c522826386480c62ec27fe46301d.tar.bz2 |
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)
Diffstat (limited to 'Python/symtable.c')
-rw-r--r-- | Python/symtable.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/Python/symtable.c b/Python/symtable.c index 5eff364..1ec51f7 100644 --- a/Python/symtable.c +++ b/Python/symtable.c @@ -1334,6 +1334,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)) |