From d16d0abf0bdf3228beed0977a953fa132f5599c3 Mon Sep 17 00:00:00 2001 From: Benjamin Peterson Date: Fri, 20 Nov 2009 01:15:53 +0000 Subject: [PATCH] provide line number for lambdas --- Python/symtable.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Python/symtable.c b/Python/symtable.c index 23f01843043..40eb866a5c0 100644 --- a/Python/symtable.c +++ b/Python/symtable.c @@ -1193,9 +1193,8 @@ 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); - /* XXX how to get line numbers for expressions */ if (!symtable_enter_block(st, lambda, - FunctionBlock, (void *)e, 0)) + FunctionBlock, (void *)e, e->lineno)) return 0; VISIT_IN_BLOCK(st, arguments, e->v.Lambda.args, (void*)e); VISIT_IN_BLOCK(st, expr, e->v.Lambda.body, (void*)e);