summaryrefslogtreecommitdiffstats
path: root/Doc/c-api/function.rst
diff options
context:
space:
mode:
authorAlexandre Vassalotti <alexandre@peadrop.com>2008-07-13 22:26:50 (GMT)
committerAlexandre Vassalotti <alexandre@peadrop.com>2008-07-13 22:26:50 (GMT)
commitb0c81654f75564a5b4558af702758e6904232941 (patch)
tree77197c38c1d6079ee75ff54a226bf94281882825 /Doc/c-api/function.rst
parent343bca613e83ce4a84f99478efffbab609d7e107 (diff)
downloadcpython-b0c81654f75564a5b4558af702758e6904232941.zip
cpython-b0c81654f75564a5b4558af702758e6904232941.tar.gz
cpython-b0c81654f75564a5b4558af702758e6904232941.tar.bz2
Added documentation for PyFunction_GetAnnotations() and
PyFunction_SetAnnotations().
Diffstat (limited to 'Doc/c-api/function.rst')
-rw-r--r--Doc/c-api/function.rst12
1 files changed, 12 insertions, 0 deletions
diff --git a/Doc/c-api/function.rst b/Doc/c-api/function.rst
index e9ed2ab..ada974c 100644
--- a/Doc/c-api/function.rst
+++ b/Doc/c-api/function.rst
@@ -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*.