Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 22 additions & 13 deletions Doc/library/dis.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1607,19 +1607,28 @@ iterations of the loop.
.. versionadded:: 3.13


.. opcode:: CALL_FUNCTION_EX (flags)

Calls a callable object with variable set of positional and keyword
arguments. If the lowest bit of *flags* is set, the top of the stack
contains a mapping object containing additional keyword arguments.
Before the callable is called, the mapping object and iterable object
are each "unpacked" and their contents passed in as keyword and
positional arguments respectively.
``CALL_FUNCTION_EX`` pops all arguments and the callable object off the stack,
calls the callable object with those arguments, and pushes the return value
returned by the callable object.

.. versionadded:: 3.6
.. opcode:: CALL_FUNCTION_EX

Calls a callable object with a variable set of positional and keyword
arguments collected at runtime. It expects (in ascending order):

* the callable object
* ``NULL`` (a marker used in the calling convention; may be elided in
optimized internal forms)
* a :class:`tuple` containing the positional arguments
* either ``NULL`` or a :class:`dict` containing the keyword arguments

The positional arguments tuple and the keyword arguments dict are each
"unpacked" and passed to the callable. ``CALL_FUNCTION_EX`` pops all these
items and pushes the callable's return value.
The presence of keyword arguments is indicated solely by whether the
last stack item is ``NULL`` or a :class:`dict`; there is no operand or
flag associated with this opcode.

.. versionadded:: 3.6
.. versionchanged:: 3.14
The opcode no longer uses a flags operand to signal the presence of
``**kwargs``; the stack layout alone determines this.


.. opcode:: PUSH_NULL
Expand Down
Loading