diff options
author | Ken Jin <28750310+Fidget-Spinner@users.noreply.github.com> | 2021-05-19 18:32:06 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-05-19 18:32:06 (GMT) |
commit | 5c6619552d2d4599458265dd5d24426ef545198d (patch) | |
tree | 8453886c564263a64fe58c8f204bde9af03e66da /Doc/library/dis.rst | |
parent | f13a6a2d671e158ca1af7ad0d47369ad50e9c21a (diff) | |
download | cpython-5c6619552d2d4599458265dd5d24426ef545198d.zip cpython-5c6619552d2d4599458265dd5d24426ef545198d.tar.gz cpython-5c6619552d2d4599458265dd5d24426ef545198d.tar.bz2 |
bpo-26110: Document `CALL_METHOD_KW` (GH-26159)
Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
Diffstat (limited to 'Doc/library/dis.rst')
-rw-r--r-- | Doc/library/dis.rst | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/Doc/library/dis.rst b/Doc/library/dis.rst index 193e400..a4746bc 100644 --- a/Doc/library/dis.rst +++ b/Doc/library/dis.rst @@ -1176,6 +1176,18 @@ All of the following opcodes use their arguments. .. versionadded:: 3.7 +.. opcode:: CALL_METHOD_KW (argc) + + Calls a method in a similar fashion as :opcode:`CALL_METHOD`, but also supports keyword arguments. + *argc* is the number of positional and keyword arguments. + This opcode is designed to be used with :opcode:`LOAD_METHOD`. TOS is a + tuple of keyword argument names. Argument values are below that. + Below them, the two items described in :opcode:`LOAD_METHOD` are on the + stack (either ``self`` and an unbound method object or ``NULL`` and an + arbitrary callable). All of them are popped from the stack and the return value is pushed. + + .. versionadded:: 3.11 + .. opcode:: MAKE_FUNCTION (flags) Pushes a new function object on the stack. From bottom to top, the consumed |