diff options
Diffstat (limited to 'Doc/c-api/function.rst')
| -rw-r--r-- | Doc/c-api/function.rst | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/Doc/c-api/function.rst b/Doc/c-api/function.rst index 66f8675..31805fd 100644 --- a/Doc/c-api/function.rst +++ b/Doc/c-api/function.rst @@ -81,3 +81,17 @@ There are a few functions specific to Python functions. *Py_None* or a tuple of cell objects. Raises :exc:`SystemError` and returns ``-1`` on failure. + + +.. c:function:: PyObject *PyFunction_GetAnnotations(PyObject *op) + + Return the annotations of the function object *op*. This can be a + mutable dictionary or *NULL*. + + +.. c:function:: int PyFunction_SetAnnotations(PyObject *op, PyObject *annotations) + + Set the annotations for the function object *op*. *annotations* + must be a dictionary or *Py_None*. + + Raises :exc:`SystemError` and returns ``-1`` on failure. |
