Skip to content

Commit 18529b5

Browse files
gh-141004: Document PyFunction_SetKwDefaults (GH-141294)
1 parent b5a0c72 commit 18529b5

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

Doc/c-api/function.rst

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,15 @@ There are a few functions specific to Python functions.
102102
dictionary of arguments or ``NULL``.
103103
104104
105+
.. c:function:: int PyFunction_SetKwDefaults(PyObject *op, PyObject *defaults)
106+
107+
Set the keyword-only argument default values of the function object *op*.
108+
*defaults* must be a dictionary of keyword-only arguments or ``Py_None``.
109+
110+
This function returns ``0`` on success, and returns ``-1`` with an exception
111+
set on failure.
112+
113+
105114
.. c:function:: PyObject* PyFunction_GetClosure(PyObject *op)
106115
107116
Return the closure associated with the function object *op*. This can be ``NULL``

0 commit comments

Comments
 (0)