summaryrefslogtreecommitdiffstats
path: root/Doc/c-api/set.rst
diff options
context:
space:
mode:
authorAntonio Cuni <anto.cuni@gmail.com>2021-01-06 11:38:26 (GMT)
committerGitHub <noreply@github.com>2021-01-06 11:38:26 (GMT)
commit315fc52db17b19fe30aa9193f26adf69e18d8844 (patch)
tree90a8795e94974c667c306f8e508c4df674bfc7b8 /Doc/c-api/set.rst
parent1a9f51ed12feb4d95ad6d0faf610a030c05b9f5e (diff)
downloadcpython-315fc52db17b19fe30aa9193f26adf69e18d8844.zip
cpython-315fc52db17b19fe30aa9193f26adf69e18d8844.tar.gz
cpython-315fc52db17b19fe30aa9193f26adf69e18d8844.tar.bz2
bpo-42528: Improve the docs of most Py*_Check{,Exact} API calls (GH-23602)
I think that none of these API calls can fail, but only few of them are documented as such. Add the sentence "This function always succeeds" (which is the same already used e.g. by PyNumber_Check) to all of them.
Diffstat (limited to 'Doc/c-api/set.rst')
-rw-r--r--Doc/c-api/set.rst9
1 files changed, 5 insertions, 4 deletions
diff --git a/Doc/c-api/set.rst b/Doc/c-api/set.rst
index 879f394..84f34e7 100644
--- a/Doc/c-api/set.rst
+++ b/Doc/c-api/set.rst
@@ -53,28 +53,29 @@ the constructor functions work with any iterable Python object.
.. c:function:: int PySet_Check(PyObject *p)
Return true if *p* is a :class:`set` object or an instance of a subtype.
+ This function always succeeds.
.. c:function:: int PyFrozenSet_Check(PyObject *p)
Return true if *p* is a :class:`frozenset` object or an instance of a
- subtype.
+ subtype. This function always succeeds.
.. c:function:: int PyAnySet_Check(PyObject *p)
Return true if *p* is a :class:`set` object, a :class:`frozenset` object, or an
- instance of a subtype.
+ instance of a subtype. This function always succeeds.
.. c:function:: int PyAnySet_CheckExact(PyObject *p)
Return true if *p* is a :class:`set` object or a :class:`frozenset` object but
- not an instance of a subtype.
+ not an instance of a subtype. This function always succeeds.
.. c:function:: int PyFrozenSet_CheckExact(PyObject *p)
Return true if *p* is a :class:`frozenset` object but not an instance of a
- subtype.
+ subtype. This function always succeeds.
.. c:function:: PyObject* PySet_New(PyObject *iterable)