Skip to content

Commit cabee26

Browse files
committed
Remove duplicate BUILD_INTERPOLATION/BUILD_TEMPLATE; clarify NOT_TAKEN docs
1 parent 542aaa4 commit cabee26

File tree

1 file changed

+12
-28
lines changed

1 file changed

+12
-28
lines changed

Doc/library/dis.rst

Lines changed: 12 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -586,21 +586,26 @@ operations on it as if it was a Python list. The top of the stack corresponds to
586586

587587

588588
.. opcode:: NOT_TAKEN
589-
Do nothing code. Used as a hint to the interpreter that a branch was predicted
590-
as not taken.
589+
590+
Do nothing code.
591+
Used by the interpreter to record :monitoring-event:`BRANCH_LEFT`
592+
and :monitoring-event:`BRANCH_RIGHT` events for :mod:`sys.monitoring`.
593+
591594
.. versionadded:: 3.14
592595

593596

594-
.. opcode:: POP_TOP
597+
.. opcode:: POP_ITER
595598

596-
Removes the top-of-stack item::
599+
Removes the iterator from the top of the stack.
597600

598-
STACK.pop()
601+
.. versionadded:: 3.14
599602

600603

601-
.. opcode:: POP_ITER
604+
.. opcode:: POP_TOP
602605

603-
Removes the iterator from the top of the stack.
606+
Removes the top-of-stack item::
607+
608+
STACK.pop()
604609

605610

606611
.. opcode:: END_FOR
@@ -1221,27 +1226,6 @@ iterations of the loop.
12211226
.. versionadded:: 3.6
12221227

12231228

1224-
.. opcode:: BUILD_INTERPOLATION
1225-
1226-
It expects as stack inputs (from top of stack down):
1227-
1228-
* ``format``: ``STACK[oparg & 1]``
1229-
* ``str``: ``STACK[-1 - (oparg & 1)]``
1230-
* ``value``: ``STACK[-2 - (oparg & 1)]``
1231-
1232-
It outputs the interpolation object to ``STACK[-1]`` after consuming its inputs.
1233-
1234-
.. versionadded:: 3.14
1235-
1236-
1237-
.. opcode:: BUILD_TEMPLATE
1238-
1239-
Consumes ``STACK[-1]`` (interpolations) and ``STACK[-2]`` (strings) and
1240-
outputs the template object to ``STACK[-1]``.
1241-
1242-
.. versionadded:: 3.14
1243-
1244-
12451229
.. opcode:: LIST_EXTEND (i)
12461230

12471231
Implements::

0 commit comments

Comments
 (0)