mirror of
https://github.com/python/cpython.git
synced 2026-02-13 19:04:37 +00:00
[3.13] gh-141004: Document PyFunction_SetKwDefaults (GH-141294) (GH-141305)
gh-141004: Document `PyFunction_SetKwDefaults` (GH-141294)
(cherry picked from commit 18529b580b)
Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
This commit is contained in:
parent
a9619899fc
commit
aa2c8ea1e7
1 changed files with 9 additions and 0 deletions
|
|
@ -102,6 +102,15 @@ There are a few functions specific to Python functions.
|
|||
dictionary of arguments or ``NULL``.
|
||||
|
||||
|
||||
.. c:function:: int PyFunction_SetKwDefaults(PyObject *op, PyObject *defaults)
|
||||
|
||||
Set the keyword-only argument default values of the function object *op*.
|
||||
*defaults* must be a dictionary of keyword-only arguments or ``Py_None``.
|
||||
|
||||
This function returns ``0`` on success, and returns ``-1`` with an exception
|
||||
set on failure.
|
||||
|
||||
|
||||
.. c:function:: PyObject* PyFunction_GetClosure(PyObject *op)
|
||||
|
||||
Return the closure associated with the function object *op*. This can be ``NULL``
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue