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 9dde908..55898f9 100644
--- a/Python/symtable.c
+++ b/Python/symtable.c
@@ -1371,14 +1371,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);