Skip to content
Prev Previous commit
Next Next commit
Document change to FOR_ITER.
  • Loading branch information
markshannon committed Sep 9, 2022
commit 5bdef2b6189917632cc2c3be1f78341a4090f980
4 changes: 3 additions & 1 deletion Doc/library/dis.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1068,9 +1068,11 @@ iterations of the loop.

TOS is an :term:`iterator`. Call its :meth:`~iterator.__next__` method. If
this yields a new value, push it on the stack (leaving the iterator below
it). If the iterator indicates it is exhausted, TOS is popped, and the byte
it). If the iterator indicates it is exhausted then the byte
code counter is incremented by *delta*.

.. versionchanged:: 3.12
Up until 3.11 the iterator was popped when it was exhausted.

.. opcode:: LOAD_GLOBAL (namei)

Expand Down