diff options
author | Amaury Forgeot d'Arc <amauryfa@gmail.com> | 2011-11-04 22:29:24 +0100 |
---|---|---|
committer | Amaury Forgeot d'Arc <amauryfa@gmail.com> | 2011-11-04 22:29:24 +0100 |
commit | df84710623e112e30a9313e420eeb17f5115ceae (patch) | |
tree | 90e62cf05a71f9f2e73366f629c5db8ff5858808 /Python/symtable.c | |
parent | 3a0d380e2d84fe54ae2ba3f11f7be5d1905b8c47 (diff) | |
parent | f96517e3cf52217f5da99c66a12d610273956090 (diff) | |
download | cpython-df84710623e112e30a9313e420eeb17f5115ceae.tar.gz |
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 3578b0c692..824a53fc1b 100644 --- a/Python/symtable.c +++ b/Python/symtable.c @@ -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)) |