]> granicus.if.org Git - python/commitdiff
Document changes for PyCode_New regarding PEP570 (GH-13706)
authorPablo Galindo <Pablogsal@gmail.com>
Fri, 31 May 2019 18:33:41 +0000 (19:33 +0100)
committerGitHub <noreply@github.com>
Fri, 31 May 2019 18:33:41 +0000 (19:33 +0100)
Doc/c-api/code.rst
Doc/whatsnew/3.8.rst

index e2b0b23335e33c56f3b2566624033b49aa06ec15..7aa91ee84d2e47c9bd3ecfedc779f67f33ecd29a 100644 (file)
@@ -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)
index 98f0c3474f26ed79c12f8eb18ccd758d6ba7375a..76d00938dbec46a23ce2da549f989e3a980dc83f 100644 (file)
@@ -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
 ------------------------