]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-110527: Improve `PySet_Clear` docs (#110528)
authorNikita Sobolev <mail@sobolevn.me>
Mon, 16 Oct 2023 13:05:09 +0000 (16:05 +0300)
committerGitHub <noreply@github.com>
Mon, 16 Oct 2023 13:05:09 +0000 (15:05 +0200)
Doc/c-api/set.rst

index 1e8a09509032f52d9cf6e608a3d23e514e2f24b6..09c0fb6b9c5f233cef91971d3a8ebfda3d1dde4c 100644 (file)
@@ -163,4 +163,6 @@ subtypes but not for instances of :class:`frozenset` or its subtypes.
 
 .. c:function:: int PySet_Clear(PyObject *set)
 
-   Empty an existing set of all elements.
+   Empty an existing set of all elements. Return ``0`` on
+   success. Return ``-1`` and raise :exc:`SystemError` if *set* is not an instance of
+   :class:`set` or its subtype.