Skip to content

[3.5] bpo-33216: Correct the doc of CALL_FUNCTION_VAR and CALL_FUNCTION_VAR_KW. #6365

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 4 commits into from
Closed
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
16 changes: 10 additions & 6 deletions Doc/library/dis.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1020,10 +1020,13 @@ the more significant byte last.

.. 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.
Calls a function. *argc* is interpreted as in :opcode:`CALL_FUNCTION`. The
difference with :opcode:`CALL_FUNCTION`, is that ``CALL_FUNCTION_VAR``
finds the var-positional argument below all the keyword parameters, but
above all positional parameters.

.. versionchanged:: 3.5
The order of elements in the stack was changed.

.. opcode:: CALL_FUNCTION_KW (argc)

Expand All @@ -1035,10 +1038,11 @@ the more significant byte last.
.. 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 finds the var-keyword argument at the top of the stack; and below,
the opcode finds the same items :opcode:`CALL_FUNCTION_VAR` does.

.. versionchanged:: 3.5
The order of elements in the stack was changed.

.. opcode:: HAVE_ARGUMENT

Expand Down