diff options
author | Mark Dickinson <mdickinson@enthought.com> | 2012-11-25 14:37:43 (GMT) |
---|---|---|
committer | Mark Dickinson <mdickinson@enthought.com> | 2012-11-25 14:37:43 (GMT) |
commit | 073f0673697380a00dc2067ab3a999354893df51 (patch) | |
tree | ea7fc1d821d1aeaf0d8f7ca68ac22545ab63925f /Python/symtable.c | |
parent | ab56710989745ff11c10205ea993c2e423c22f75 (diff) | |
parent | ded35aeb9d5ae1671174f10c0ae8a7166693b17c (diff) | |
download | cpython-073f0673697380a00dc2067ab3a999354893df51.zip cpython-073f0673697380a00dc2067ab3a999354893df51.tar.gz cpython-073f0673697380a00dc2067ab3a999354893df51.tar.bz2 |
Issue #16546: merge fix from 3.3
Diffstat (limited to 'Python/symtable.c')
-rw-r--r-- | Python/symtable.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/Python/symtable.c b/Python/symtable.c index da2c1e3..8d941f0 100644 --- a/Python/symtable.c +++ b/Python/symtable.c @@ -1412,14 +1412,14 @@ symtable_visit_expr(struct symtable *st, expr_ty e) VISIT_QUIT(st, 0); break; case Yield_kind: - case YieldFrom_kind: { - expr_ty value; - value = (e->kind == YieldFrom_kind) ? e->v.YieldFrom.value : e->v.Yield.value; - if (value) - VISIT(st, expr, value); + if (e->v.Yield.value) + VISIT(st, expr, e->v.Yield.value); + st->st_cur->ste_generator = 1; + break; + case YieldFrom_kind: + VISIT(st, expr, e->v.YieldFrom.value); st->st_cur->ste_generator = 1; break; - } case Compare_kind: VISIT(st, expr, e->v.Compare.left); VISIT_SEQ(st, expr, e->v.Compare.comparators); |