summaryrefslogtreecommitdiffstats
path: root/Python/symtable.c
diff options
context:
space:
mode:
Diffstat (limited to 'Python/symtable.c')
-rw-r--r--Python/symtable.c12
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);