mirror of
https://github.com/python/cpython.git
synced 2025-09-26 18:29:57 +00:00
Closes #13026: fix documentation of MAKE_FUNCTION for 3.x.
This commit is contained in:
parent
57f936ecde
commit
c96ef1f0ed
1 changed files with 11 additions and 4 deletions
|
@ -754,10 +754,17 @@ the more significant byte last.
|
||||||
|
|
||||||
.. opcode:: MAKE_FUNCTION (argc)
|
.. opcode:: MAKE_FUNCTION (argc)
|
||||||
|
|
||||||
Pushes a new function object on the stack. TOS is the
|
Pushes a new function object on the stack. From bottom to top, the consumed
|
||||||
:term:`qualified name` of the function; TOS1 is the code associated with
|
stack must consist of
|
||||||
the function. The function object is defined to have *argc* default parameters,
|
|
||||||
which are found below TOS1.
|
* ``argc & 0xFF`` default argument objects in positional order
|
||||||
|
* ``(argc >> 8) & 0xFF`` pairs of name and default argument, with the name
|
||||||
|
just below the object on the stack, for keyword-only parameters
|
||||||
|
* ``(argc >> 16) & 0x7FFF`` parameter annotation objects
|
||||||
|
* a tuple listing the parameter names for the annotations (only if there are
|
||||||
|
ony annotation objects)
|
||||||
|
* the code associated with the function (at TOS1)
|
||||||
|
* the :term:`qualified name` of the function (at TOS)
|
||||||
|
|
||||||
|
|
||||||
.. opcode:: MAKE_CLOSURE (argc)
|
.. opcode:: MAKE_CLOSURE (argc)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue