summaryrefslogtreecommitdiffstats
path: root/Doc/library
diff options
context:
space:
mode:
Diffstat (limited to 'Doc/library')
-rw-r--r--Doc/library/dis.rst13
1 files changed, 12 insertions, 1 deletions
diff --git a/Doc/library/dis.rst b/Doc/library/dis.rst
index c6b4303..1eaa9f3 100644
--- a/Doc/library/dis.rst
+++ b/Doc/library/dis.rst
@@ -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
@@ -1088,9 +1097,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)