summaryrefslogtreecommitdiffstats
path: root/Python
diff options
context:
space:
mode:
authorBenjamin Peterson <benjamin@python.org>2009-11-20 01:19:48 (GMT)
committerBenjamin Peterson <benjamin@python.org>2009-11-20 01:19:48 (GMT)
commitfde6d3349e4468267742f6a813953f74924ce119 (patch)
tree1b4b3d42bc1a68ab8d283e58d15b450f3aaae3a4 /Python
parent2c8f8596019ca720b70ed8022d1ea715fddc8ba9 (diff)
downloadcpython-fde6d3349e4468267742f6a813953f74924ce119.zip
cpython-fde6d3349e4468267742f6a813953f74924ce119.tar.gz
cpython-fde6d3349e4468267742f6a813953f74924ce119.tar.bz2
Merged revisions 76423-76424 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk ........ r76423 | benjamin.peterson | 2009-11-19 19:15:53 -0600 (Thu, 19 Nov 2009) | 1 line provide line number for lambdas ........ r76424 | benjamin.peterson | 2009-11-19 19:16:58 -0600 (Thu, 19 Nov 2009) | 1 line genexps have linenos ........
Diffstat (limited to 'Python')
-rw-r--r--Python/symtable.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/Python/symtable.c b/Python/symtable.c
index e0b28c9..f3ba088 100644
--- a/Python/symtable.c
+++ b/Python/symtable.c
@@ -1217,9 +1217,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);
@@ -1495,7 +1494,7 @@ symtable_visit_genexp(struct symtable *st, expr_ty e)
VISIT(st, expr, outermost->iter);
/* Create generator scope for the rest */
if (!GET_IDENTIFIER(genexpr) ||
- !symtable_enter_block(st, genexpr, FunctionBlock, (void *)e, 0)) {
+ !symtable_enter_block(st, genexpr, FunctionBlock, (void *)e, e->lineno)) {
return 0;
}
st->st_cur->ste_generator = 1;