Skip to content

Commit 7d3dafa

Browse files
committed
Clarifications
1 parent d2996f2 commit 7d3dafa

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
Ensure that both and left branches have same source for ``async for`` loops.
1+
Ensure that both left and right branches have the same source for ``async for`` loops.
22
Add these branches to the ``co_branches()`` iterator.

Python/assemble.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -675,7 +675,8 @@ resolve_jump_offsets(instr_sequence *instrs)
675675
instruction *target = &instrs->s_instrs[instr->i_target];
676676
instr->i_oparg = target->i_offset;
677677
if (instr->i_opcode == END_ASYNC_FOR) {
678-
// Monitoring needs the target to be the END_SEND
678+
// sys.monitoring needs to be able to find the matching END_SEND
679+
// but the target is the SEND, so we adjust it here.
679680
instr->i_oparg = offset - instr->i_oparg - END_SEND_OFFSET;
680681
}
681682
else if (instr->i_oparg < offset) {

0 commit comments

Comments
 (0)