mirror of https://github.com/python/cpython.git
Added documentation for PyFunction_GetAnnotations() and
PyFunction_SetAnnotations().
This commit is contained in:
parent
343bca613e
commit
b0c81654f7
|
@ -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*.
|
||||
|
|
Loading…
Reference in New Issue