Skip to content

Commit 75e6184

Browse files
[3.14] GH-135171: Bug fix 2, all related changes in codegen.c are reverted
1 parent 53bd362 commit 75e6184

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

Python/codegen.c

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4411,7 +4411,6 @@ codegen_sync_comprehension_generator(compiler *c, location loc,
44114411

44124412
comprehension_ty gen = (comprehension_ty)asdl_seq_GET(generators,
44134413
gen_index);
4414-
int is_outer_genexpr = gen_index == 0 && type == COMP_GENEXP;
44154414
if (!iter_on_stack) {
44164415
if (gen_index == 0) {
44174416
assert(METADATA(c)->u_argcount == 1);
@@ -4442,15 +4441,13 @@ codegen_sync_comprehension_generator(compiler *c, location loc,
44424441
}
44434442
if (IS_JUMP_TARGET_LABEL(start)) {
44444443
VISIT(c, expr, gen->iter);
4444+
ADDOP(c, LOC(gen->iter), GET_ITER);
44454445
}
44464446
}
44474447
}
44484448

44494449
if (IS_JUMP_TARGET_LABEL(start)) {
44504450
depth++;
4451-
if (!is_outer_genexpr) {
4452-
ADDOP(c, LOC(gen->iter), GET_ITER);
4453-
}
44544451
USE_LABEL(c, start);
44554452
ADDOP_JUMP(c, LOC(gen->iter), FOR_ITER, anchor);
44564453
}

0 commit comments

Comments
 (0)