Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions 3 Doc/c-api/code.rst
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,9 @@ bound into a function.
:c:func:`PyCode_New` directly can bind you to a precise Python
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"

.. c:function:: PyCodeObject* PyCode_NewEmpty(const char *filename, const char *funcname, int firstlineno)
Expand Down
3 changes: 3 additions & 0 deletions 3 Doc/whatsnew/3.8.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1278,6 +1278,9 @@ Changes in the C API

(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
------------------------
Expand Down
Morty Proxy This is a proxified and sanitized view of the page, visit original site.