summaryrefslogtreecommitdiff
path: root/Python/symtable.c
diff options
context:
space:
mode:
authorAmaury Forgeot d'Arc <amauryfa@gmail.com>2011-11-04 22:17:45 +0100
committerAmaury Forgeot d'Arc <amauryfa@gmail.com>2011-11-04 22:17:45 +0100
commitf96517e3cf52217f5da99c66a12d610273956090 (patch)
tree5489da49689d0b392d96090d586778af455e368f /Python/symtable.c
parente354347e7c819d26da08b4b30bc080027e086beb (diff)
downloadcpython-f96517e3cf52217f5da99c66a12d610273956090.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.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/Python/symtable.c b/Python/symtable.c
index 5eff364439..1ec51f708c 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))