Skip to content

Commit

Permalink
pythongh-121533: Improve PyCell_[Get,Set] docs: mention the excepti…
Browse files Browse the repository at this point in the history
…ons (python#121534)

Co-authored-by: Victor Stinner <[email protected]>
  • Loading branch information
sobolevn and vstinner authored Jul 9, 2024
1 parent 9ba2a46 commit 649d5b6
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions Doc/c-api/cell.rst
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,8 @@ Cell objects are not likely to be useful elsewhere.
.. c:function:: PyObject* PyCell_Get(PyObject *cell)
Return the contents of the cell *cell*.
Return the contents of the cell *cell*, which can be ``NULL``.
If *cell* is not a cell object, returns ``NULL`` with an exception set.
.. c:function:: PyObject* PyCell_GET(PyObject *cell)
Expand All @@ -52,8 +53,10 @@ Cell objects are not likely to be useful elsewhere.
Set the contents of the cell object *cell* to *value*. This releases the
reference to any current content of the cell. *value* may be ``NULL``. *cell*
must be non-``NULL``; if it is not a cell object, ``-1`` will be returned. On
success, ``0`` will be returned.
must be non-``NULL``.
On success, return ``0``.
If *cell* is not a cell object, set an exception and return ``-1``.
.. c:function:: void PyCell_SET(PyObject *cell, PyObject *value)
Expand Down

0 comments on commit 649d5b6

Please sign in to comment.