Skip to content

Commit e0fe2eb

Browse files
committed
Remove obsolete (flags) from CALL_FUNCTION_EX docs
1 parent f57be7b commit e0fe2eb

File tree

1 file changed

+24
-13
lines changed

1 file changed

+24
-13
lines changed

Doc/library/dis.rst

Lines changed: 24 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1607,19 +1607,30 @@ iterations of the loop.
16071607
.. versionadded:: 3.13
16081608

16091609

1610-
.. opcode:: CALL_FUNCTION_EX (flags)
1611-
1612-
Calls a callable object with variable set of positional and keyword
1613-
arguments. If the lowest bit of *flags* is set, the top of the stack
1614-
contains a mapping object containing additional keyword arguments.
1615-
Before the callable is called, the mapping object and iterable object
1616-
are each "unpacked" and their contents passed in as keyword and
1617-
positional arguments respectively.
1618-
``CALL_FUNCTION_EX`` pops all arguments and the callable object off the stack,
1619-
calls the callable object with those arguments, and pushes the return value
1620-
returned by the callable object.
1621-
1622-
.. versionadded:: 3.6
1610+
.. opcode:: CALL_FUNCTION_EX
1611+
1612+
Calls a callable object with a variable set of positional and keyword
1613+
arguments collected at runtime. It expects (in ascending order):
1614+
1615+
* the callable object
1616+
* ``NULL`` (a marker used in the calling convention; may be elided in
1617+
optimized internal forms)
1618+
* a :class:`tuple` containing the positional arguments
1619+
* either ``NULL`` or a :class:`dict` containing the keyword arguments
1620+
1621+
The positional arguments tuple and the keyword arguments dict are each
1622+
"unpacked" and passed to the callable. ``CALL_FUNCTION_EX`` pops all these
1623+
items and pushes the callable's return value.
1624+
1625+
Earlier Python versions documented an integer *flags* operand indicating
1626+
the presence of a mapping object for keyword arguments; this no longer
1627+
applies. The opcode itself no longer has a separate operand or flag bits
1628+
for this purpose in Python 3.14 and later.
1629+
1630+
.. versionadded:: 3.6
1631+
.. versionchanged:: 3.14
1632+
The obsolete *flags* argument was removed from the documentation; the
1633+
opcode no longer uses an operand to signal presence of ``**kwargs``.
16231634

16241635

16251636
.. opcode:: PUSH_NULL

0 commit comments

Comments
 (0)