Skip to content

Commit 545a3b8

Browse files
authored
Document changes for PyCode_New regarding PEP570 (GH-13706)
1 parent c8d5bf6 commit 545a3b8

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

Doc/c-api/code.rst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,9 @@ bound into a function.
4040
:c:func:`PyCode_New` directly can bind you to a precise Python
4141
version since the definition of the bytecode changes often.
4242
43+
.. versionchanged:: 3.8
44+
An extra parameter is required (*posonlyargcount*) to support :PEP:`570`.
45+
4346
.. audit-event:: code.__new__ "code filename name argcount kwonlyargcount nlocals stacksize flags"
4447
4548
.. c:function:: PyCodeObject* PyCode_NewEmpty(const char *filename, const char *funcname, int firstlineno)

Doc/whatsnew/3.8.rst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1278,6 +1278,9 @@ Changes in the C API
12781278

12791279
(Contributed by Antoine Pitrou in :issue:`32388`.)
12801280

1281+
* The :c:func:`PyCode_New` has a new parameter in the second position (*posonlyargcount*)
1282+
to support :pep:`570`, indicating the number of positional-only arguments.
1283+
12811284

12821285
CPython bytecode changes
12831286
------------------------

0 commit comments

Comments
 (0)