Skip to content
Prev Previous commit
Add END_FOR to docs.
  • Loading branch information
markshannon committed Oct 26, 2022
commit b6086b6fc0930191d52047560be77a220c4c2339
9 changes: 9 additions & 0 deletions Doc/library/dis.rst
Original file line number Diff line number Diff line change
Expand Up @@ -413,6 +413,15 @@ The Python compiler currently generates the following bytecode instructions.
Removes the top-of-stack (TOS) item.


.. opcode:: END_FOR

Removes the top two values from the stack.
Equivalent to POP_TOP; POP_TOP.
Used to clean up at the end of loops, hence the name.

.. versionadded:: 3.12


.. opcode:: COPY (i)

Push the *i*-th item to the top of the stack. The item is not removed from its
Expand Down