◐ Shell
reader mode source ↗
Skip to content
Merged
Changes from all commits
File filter
Conversations
Jump to
Diff view
Apply and reload
Show whitespace
Diff view
Apply and reload
69 changes: 39 additions & 30 deletions Doc/library/dis.rst
Original file line number Diff line number Diff line change
Expand Up @@ -998,14 +998,45 @@ All of the following opcodes use their arguments.

.. opcode:: CALL_FUNCTION (argc)

Calls a function. The low byte of *argc* indicates the number of positional
parameters, the high byte the number of keyword parameters. On the stack, the
opcode finds the keyword parameters first. For each keyword argument, the
value is on top of the key. Below the keyword parameters, the positional
parameters are on the stack, with the right-most parameter on top. Below the
parameters, the function object to call is on the stack. Pops all function
arguments, and the function itself off the stack, and pushes the return
value.


.. opcode:: MAKE_FUNCTION (argc)
Expand Down @@ -1038,28 +1069,6 @@ All of the following opcodes use their arguments.
two most-significant bytes.


.. opcode:: CALL_FUNCTION_VAR (argc)

Calls a function. *argc* is interpreted as in :opcode:`CALL_FUNCTION`. The
top element on the stack contains the variable argument list, followed by
keyword and positional arguments.


.. opcode:: CALL_FUNCTION_KW (argc)

Calls a function. *argc* is interpreted as in :opcode:`CALL_FUNCTION`. The
top element on the stack contains the keyword arguments dictionary, followed
by explicit keyword and positional arguments.


.. opcode:: CALL_FUNCTION_VAR_KW (argc)

Calls a function. *argc* is interpreted as in :opcode:`CALL_FUNCTION`. The
top element on the stack contains the keyword arguments dictionary, followed
by the variable-arguments tuple, followed by explicit keyword and positional
arguments.


.. opcode:: FORMAT_VALUE (flags)

Used for implementing formatted literal strings (f-strings). Pops
Expand Down
Toggle all file notes Toggle all file annotations