Skip to content

Commit bfc1cd8

Browse files
authored
gh-110527: Improve PySet_Clear docs (#110528)
1 parent c2192a2 commit bfc1cd8

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

Doc/c-api/set.rst

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,4 +163,6 @@ subtypes but not for instances of :class:`frozenset` or its subtypes.
163163
164164
.. c:function:: int PySet_Clear(PyObject *set)
165165
166-
Empty an existing set of all elements.
166+
Empty an existing set of all elements. Return ``0`` on
167+
success. Return ``-1`` and raise :exc:`SystemError` if *set* is not an instance of
168+
:class:`set` or its subtype.

0 commit comments

Comments
 (0)