Skip to content

Commit 37cb8e9

Browse files
committed
Update docs
1 parent 282b494 commit 37cb8e9

File tree

1 file changed

+12
-22
lines changed

1 file changed

+12
-22
lines changed

Doc/library/dis.rst

Lines changed: 12 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,9 @@ the following command can be used to display the disassembly of
5858
<BLANKLINE>
5959
3 2 LOAD_GLOBAL 1 (len + NULL)
6060
12 LOAD_FAST 0 (alist)
61-
14 CALL 1
62-
22 RETURN_VALUE
61+
14 PUSH_NULL
62+
16 CALL 1
63+
24 RETURN_VALUE
6364

6465
(The "2" is a line number).
6566

@@ -138,6 +139,7 @@ Example:
138139
RESUME
139140
LOAD_GLOBAL
140141
LOAD_FAST
142+
PUSH_NULL
141143
CALL
142144
RETURN_VALUE
143145

@@ -1391,21 +1393,14 @@ iterations of the loop.
13911393
.. opcode:: CALL (argc)
13921394

13931395
Calls a callable object with the number of arguments specified by ``argc``,
1394-
including the named arguments specified by the preceding
1395-
:opcode:`KW_NAMES`, if any.
1396-
On the stack are (in ascending order), either:
1396+
including the named arguments, if any.
1397+
On the stack are (in ascending order):
13971398

1398-
* NULL
13991399
* The callable
1400-
* The positional arguments
1401-
* The named arguments
1402-
1403-
or:
1404-
1405-
* The callable
1406-
* ``self``
1400+
* ``self`` (or ``NULL``)
14071401
* The remaining positional arguments
14081402
* The named arguments
1403+
* A tuple of keyword names (or ``NULL``)
14091404

14101405
``argc`` is the total of the positional and named arguments, excluding
14111406
``self`` when a ``NULL`` is not present.
@@ -1416,6 +1411,10 @@ iterations of the loop.
14161411

14171412
.. versionadded:: 3.11
14181413

1414+
.. versionchanged:: 3.13
1415+
Keyword names are now pushed to the stack instead of being indicated by
1416+
a preceding ``KW_NAMES`` instruction.
1417+
14191418

14201419
.. opcode:: CALL_FUNCTION_EX (flags)
14211420

@@ -1441,15 +1440,6 @@ iterations of the loop.
14411440
.. versionadded:: 3.11
14421441

14431442

1444-
.. opcode:: KW_NAMES (consti)
1445-
1446-
Prefixes :opcode:`CALL`.
1447-
Stores a reference to ``co_consts[consti]`` into an internal variable
1448-
for use by :opcode:`CALL`. ``co_consts[consti]`` must be a tuple of strings.
1449-
1450-
.. versionadded:: 3.11
1451-
1452-
14531443
.. opcode:: MAKE_FUNCTION
14541444

14551445
Pushes a new function object on the stack built from the code object at ``STACK[1]``.

0 commit comments

Comments
 (0)