Skip to content

bpo-36540: Document changes for PyCode_New regarding PEP570 #13706

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 31, 2019
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 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 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