Added documentation for PyFunction_GetAnnotations() and

PyFunction_SetAnnotations().
This commit is contained in:
Alexandre Vassalotti 2008-07-13 22:26:50 +00:00
parent 343bca613e
commit b0c81654f7
1 changed files with 12 additions and 0 deletions

View File

@ -81,3 +81,15 @@ 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.
.. cfunction:: PyObject *PyFunction_GetAnnotations(PyObject *op)
Return the annotations of the function object *op*. This can be a
mutable dictionary or *NULL*.
.. cfunction:: int PyFunction_SetAnnotations(PyObject *op, PyObject *annotations)
Set the annotations for the function object *op*. *annotations*
must be a dictionary or *Py_None*.