]> granicus.if.org Git - python/commitdiff
genexps have linenos
authorBenjamin Peterson <benjamin@python.org>
Fri, 20 Nov 2009 01:16:58 +0000 (01:16 +0000)
committerBenjamin Peterson <benjamin@python.org>
Fri, 20 Nov 2009 01:16:58 +0000 (01:16 +0000)
Python/symtable.c

index 40eb866a5c06cde0795a878853fe7fa548cb5eb4..d782a19547d1e87bdba43fdda1d6f06a8c3a1afb 100644 (file)
@@ -1468,7 +1468,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;