@@ -1421,23 +1421,34 @@ iterations of the loop.
1421
1421
.. versionadded :: 3.11
1422
1422
1423
1423
1424
- .. opcode :: MAKE_FUNCTION (flags)
1424
+ .. opcode :: MAKE_FUNCTION
1425
1425
1426
- Pushes a new function object on the stack. From bottom to top, the consumed
1427
- stack must consist of values if the argument carries a specified flag value
1426
+ Pushes a new function object on the stack built from the code object at ``STACK[1] ``.
1427
+
1428
+ .. versionchanged :: 3.10
1429
+ Flag value ``0x04 `` is a tuple of strings instead of dictionary
1430
+
1431
+ .. versionchanged :: 3.11
1432
+ Qualified name at ``STACK[-1] `` was removed.
1433
+
1434
+ .. versionchanged :: 3.13
1435
+ Extra function attributes on the stack, signaled by oparg flags, were
1436
+ removed. They now use :opcode: `SET_FUNCTION_ATTRIBUTE `.
1437
+
1438
+
1439
+ .. opcode :: SET_FUNCTION_ATTRIBUTE (flag)
1440
+
1441
+ Sets an attribute on a function object. Expects the function at ``STACK[-1] ``
1442
+ and the attribute value to set at ``STACK[-2] ``; consumes both and leaves the
1443
+ function at ``STACK[-1] ``. The flag determines which attribute to set:
1428
1444
1429
1445
* ``0x01 `` a tuple of default values for positional-only and
1430
1446
positional-or-keyword parameters in positional order
1431
1447
* ``0x02 `` a dictionary of keyword-only parameters' default values
1432
1448
* ``0x04 `` a tuple of strings containing parameters' annotations
1433
1449
* ``0x08 `` a tuple containing cells for free variables, making a closure
1434
- * the code associated with the function (at ``STACK[-1] ``)
1435
-
1436
- .. versionchanged :: 3.10
1437
- Flag value ``0x04 `` is a tuple of strings instead of dictionary
1438
1450
1439
- .. versionchanged :: 3.11
1440
- Qualified name at ``STACK[-1] `` was removed.
1451
+ .. versionadded :: 3.13
1441
1452
1442
1453
1443
1454
.. opcode :: BUILD_SLICE (argc)
0 commit comments