summaryrefslogtreecommitdiffstats
path: root/Doc/c-api/code.rst
diff options
context:
space:
mode:
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>2023-07-29 17:52:17 (GMT)
committerGitHub <noreply@github.com>2023-07-29 17:52:17 (GMT)
commite3b5ed7b1cb8ad12aa285cf78303c6dda0953181 (patch)
tree391e7969f9d148b55f28b72d98285ccd0623ab45 /Doc/c-api/code.rst
parent2c0a99d322037d653063dc8466b886110e0fc447 (diff)
downloadcpython-e3b5ed7b1cb8ad12aa285cf78303c6dda0953181.zip
cpython-e3b5ed7b1cb8ad12aa285cf78303c6dda0953181.tar.gz
cpython-e3b5ed7b1cb8ad12aa285cf78303c6dda0953181.tar.bz2
[3.12] Fix the documentation for PyCode_New add `qualname` parameter (GH-107186) (#107440)
Fix the documentation for PyCode_New add `qualname` parameter (GH-107186) (cherry picked from commit f2abeb590dae5918388f91b60b31f040d44218f0) Co-authored-by: da-woods <dw-git@d-woods.co.uk>
Diffstat (limited to 'Doc/c-api/code.rst')
-rw-r--r--Doc/c-api/code.rst8
1 files changed, 4 insertions, 4 deletions
diff --git a/Doc/c-api/code.rst b/Doc/c-api/code.rst
index 89fe42d..5082b0c 100644
--- a/Doc/c-api/code.rst
+++ b/Doc/c-api/code.rst
@@ -33,7 +33,7 @@ bound into a function.
Return the number of free variables in *co*.
-.. c:function:: PyCodeObject* PyUnstable_Code_New(int argcount, int kwonlyargcount, int nlocals, int stacksize, int flags, PyObject *code, PyObject *consts, PyObject *names, PyObject *varnames, PyObject *freevars, PyObject *cellvars, PyObject *filename, PyObject *name, int firstlineno, PyObject *linetable, PyObject *exceptiontable)
+.. c:function:: PyCodeObject* PyUnstable_Code_New(int argcount, int kwonlyargcount, int nlocals, int stacksize, int flags, PyObject *code, PyObject *consts, PyObject *names, PyObject *varnames, PyObject *freevars, PyObject *cellvars, PyObject *filename, PyObject *name, PyObject *qualname, int firstlineno, PyObject *linetable, PyObject *exceptiontable)
Return a new code object. If you need a dummy code object to create a frame,
use :c:func:`PyCode_NewEmpty` instead.
@@ -46,7 +46,7 @@ bound into a function.
execution or VM crashes. Use this function only with extreme care.
.. versionchanged:: 3.11
- Added ``exceptiontable`` parameter.
+ Added ``qualname`` and ``exceptiontable`` parameters.
.. index:: single: PyCode_New
@@ -56,7 +56,7 @@ bound into a function.
The old name is deprecated, but will remain available until the
signature changes again.
-.. c:function:: PyCodeObject* PyUnstable_Code_NewWithPosOnlyArgs(int argcount, int posonlyargcount, int kwonlyargcount, int nlocals, int stacksize, int flags, PyObject *code, PyObject *consts, PyObject *names, PyObject *varnames, PyObject *freevars, PyObject *cellvars, PyObject *filename, PyObject *name, int firstlineno, PyObject *linetable, PyObject *exceptiontable)
+.. c:function:: PyCodeObject* PyUnstable_Code_NewWithPosOnlyArgs(int argcount, int posonlyargcount, int kwonlyargcount, int nlocals, int stacksize, int flags, PyObject *code, PyObject *consts, PyObject *names, PyObject *varnames, PyObject *freevars, PyObject *cellvars, PyObject *filename, PyObject *name, PyObject *qualname, int firstlineno, PyObject *linetable, PyObject *exceptiontable)
Similar to :c:func:`PyUnstable_Code_New`, but with an extra "posonlyargcount" for positional-only arguments.
The same caveats that apply to ``PyUnstable_Code_New`` also apply to this function.
@@ -66,7 +66,7 @@ bound into a function.
.. versionadded:: 3.8 as ``PyCode_NewWithPosOnlyArgs``
.. versionchanged:: 3.11
- Added ``exceptiontable`` parameter.
+ Added ``qualname`` and ``exceptiontable`` parameters.
.. versionchanged:: 3.12