mirror of
https://github.com/python/cpython.git
synced 2025-12-23 09:19:18 +00:00
[3.13] gh-121533: Improve PyCell_[Get,Set] docs: mention the exceptions (GH-121534) (#121539)
gh-121533: Improve `PyCell_[Get,Set]` docs: mention the exceptions (GH-121534)
(cherry picked from commit 649d5b6d7b)
Co-authored-by: sobolevn <mail@sobolevn.me>
Co-authored-by: Victor Stinner <vstinner@python.org>
This commit is contained in:
parent
3efe02e2c7
commit
8d473d8e57
1 changed files with 6 additions and 3 deletions
|
|
@ -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)
|
||||
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue