Skip to content

Commit 1d5ab85

Browse files
align set docs with dict
1 parent cce95cc commit 1d5ab85

File tree

1 file changed

+10
-13
lines changed

1 file changed

+10
-13
lines changed

Doc/c-api/set.rst

Lines changed: 10 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -91,8 +91,8 @@ the constructor functions work with any iterable Python object.
9191
9292
.. note::
9393
94-
The operation is atomic in the :term:`free-threaded build`, if *iterable* is a set,
95-
frozenset, dict or frozendict.
94+
The operation is atomic on :term:`free threading <free-threaded build>`
95+
when *iterable* is a :class:`set`, :class:`frozenset`, :class:`dict` or :class:`frozendict`.
9696
9797
9898
.. c:function:: PyObject* PyFrozenSet_New(PyObject *iterable)
@@ -104,8 +104,8 @@ the constructor functions work with any iterable Python object.
104104
105105
.. note::
106106
107-
The operation is atomic in the :term:`free-threaded build`, if *iterable* is a set,
108-
frozenset, dict or frozendict.
107+
The operation is atomic on :term:`free threading <free-threaded build>`
108+
when *iterable* is a :class:`set`, :class:`frozenset`, :class:`dict` or :class:`frozendict`.
109109
110110
111111
The following functions and macros are available for instances of :class:`set`
@@ -136,9 +136,8 @@ or :class:`frozenset` or instances of their subtypes.
136136
137137
.. note::
138138
139-
The operation is atomic in the :term:`free-threaded build`, if *key*
140-
is a simple type (e.g. :class:`str`, :class:`int`, :class:`float`) or any
141-
other object which does not define :meth:`~object.__hash__` and :meth:`~object.__eq__` methods.
139+
The operation is atomic on :term:`free threading <free-threaded build>`
140+
when *key* is :class:`str`, :class:`int`, :class:`float`, :class:`bool` or :class:`bytes`.
142141
143142
.. c:function:: int PySet_Add(PyObject *set, PyObject *key)
144143
@@ -152,9 +151,8 @@ or :class:`frozenset` or instances of their subtypes.
152151
153152
.. note::
154153
155-
The operation is atomic in the :term:`free-threaded build`, if *key*
156-
is a simple type (e.g. :class:`str`, :class:`int`, :class:`float`) or any
157-
other object which does not define :meth:`~object.__hash__` and :meth:`~object.__eq__` methods.
154+
The operation is atomic on :term:`free threading <free-threaded build>`
155+
when *key* is :class:`str`, :class:`int`, :class:`float`, :class:`bool` or :class:`bytes`.
158156
159157
160158
@@ -173,9 +171,8 @@ subtypes but not for instances of :class:`frozenset` or its subtypes.
173171
174172
.. note::
175173
176-
The operation is atomic in the :term:`free-threaded build`, if *key*
177-
is a simple type (e.g. :class:`str`, :class:`int`, :class:`float`) or any
178-
other object which does not define :meth:`~object.__hash__` and :meth:`~object.__eq__` methods.
174+
The operation is atomic on :term:`free threading <free-threaded build>`
175+
when *key* is :class:`str`, :class:`int`, :class:`float`, :class:`bool` or :class:`bytes`.
179176
180177
181178
.. c:function:: PyObject* PySet_Pop(PyObject *set)

0 commit comments

Comments
 (0)