From 6ccc17e3b2f16576c0a1c4bc8a1dc0fe2df2d3ef Mon Sep 17 00:00:00 2001 From: Yongzi Li <204532581+Yzi-Li@users.noreply.github.com> Date: Mon, 29 Sep 2025 00:46:01 +0800 Subject: [PATCH] gh-135447: Document the ``NOT_TAKEN`` & ``POP_ITER`` bytecode instructions (GH-135803) (cherry picked from commit 519bc470fc874b9aaad8eed0de7b99736d18c09f) Co-authored-by: Yongzi Li <204532581+Yzi-Li@users.noreply.github.com> Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com> Co-authored-by: Ken Jin --- Doc/library/dis.rst | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/Doc/library/dis.rst b/Doc/library/dis.rst index 21bd1db5f338de..711ef55def6949 100644 --- a/Doc/library/dis.rst +++ b/Doc/library/dis.rst @@ -585,6 +585,22 @@ operations on it as if it was a Python list. The top of the stack corresponds to generate line tracing events. +.. opcode:: NOT_TAKEN + + Do nothing code. + Used by the interpreter to record :monitoring-event:`BRANCH_LEFT` + and :monitoring-event:`BRANCH_RIGHT` events for :mod:`sys.monitoring`. + + .. versionadded:: 3.14 + + +.. opcode:: POP_ITER + + Removes the iterator from the top of the stack. + + .. versionadded:: 3.14 + + .. opcode:: POP_TOP Removes the top-of-stack item::