Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit b0c8165

Browse files
committed
Added documentation for PyFunction_GetAnnotations() and
PyFunction_SetAnnotations().
1 parent 343bca6 commit b0c8165

1 file changed

Lines changed: 12 additions & 0 deletions

File tree

Doc/c-api/function.rst

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,3 +81,15 @@ There are a few functions specific to Python functions.
8181
*Py_None* or a tuple of cell objects.
8282

8383
Raises :exc:`SystemError` and returns ``-1`` on failure.
84+
85+
86+
.. cfunction:: PyObject *PyFunction_GetAnnotations(PyObject *op)
87+
88+
Return the annotations of the function object *op*. This can be a
89+
mutable dictionary or *NULL*.
90+
91+
92+
.. cfunction:: int PyFunction_SetAnnotations(PyObject *op, PyObject *annotations)
93+
94+
Set the annotations for the function object *op*. *annotations*
95+
must be a dictionary or *Py_None*.

0 commit comments

Comments
 (0)