mirror of
https://github.com/python/cpython.git
synced 2025-08-02 16:13:13 +00:00
Document changes for PyCode_New regarding PEP570 (GH-13706)
This commit is contained in:
parent
c8d5bf6c3f
commit
545a3b8814
2 changed files with 6 additions and 0 deletions
|
@ -40,6 +40,9 @@ bound into a function.
|
||||||
:c:func:`PyCode_New` directly can bind you to a precise Python
|
:c:func:`PyCode_New` directly can bind you to a precise Python
|
||||||
version since the definition of the bytecode changes often.
|
version since the definition of the bytecode changes often.
|
||||||
|
|
||||||
|
.. versionchanged:: 3.8
|
||||||
|
An extra parameter is required (*posonlyargcount*) to support :PEP:`570`.
|
||||||
|
|
||||||
.. audit-event:: code.__new__ "code filename name argcount kwonlyargcount nlocals stacksize flags"
|
.. audit-event:: code.__new__ "code filename name argcount kwonlyargcount nlocals stacksize flags"
|
||||||
|
|
||||||
.. c:function:: PyCodeObject* PyCode_NewEmpty(const char *filename, const char *funcname, int firstlineno)
|
.. c:function:: PyCodeObject* PyCode_NewEmpty(const char *filename, const char *funcname, int firstlineno)
|
||||||
|
|
|
@ -1278,6 +1278,9 @@ Changes in the C API
|
||||||
|
|
||||||
(Contributed by Antoine Pitrou in :issue:`32388`.)
|
(Contributed by Antoine Pitrou in :issue:`32388`.)
|
||||||
|
|
||||||
|
* The :c:func:`PyCode_New` has a new parameter in the second position (*posonlyargcount*)
|
||||||
|
to support :pep:`570`, indicating the number of positional-only arguments.
|
||||||
|
|
||||||
|
|
||||||
CPython bytecode changes
|
CPython bytecode changes
|
||||||
------------------------
|
------------------------
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue