summaryrefslogtreecommitdiffstats
path: root/Doc/c-api
diff options
context:
space:
mode:
authorRaymond Hettinger <python@rcn.com>2008-01-26 08:19:06 (GMT)
committerRaymond Hettinger <python@rcn.com>2008-01-26 08:19:06 (GMT)
commit7c1be2a3b191127745a8f58fb3d9115b5ffbde93 (patch)
tree610467dd61d9907dad1d538dc2bcb0a51f9a73d2 /Doc/c-api
parent960efe9c2d9611ae0f2cd76ed62ff4db792bd0d2 (diff)
downloadcpython-7c1be2a3b191127745a8f58fb3d9115b5ffbde93.zip
cpython-7c1be2a3b191127745a8f58fb3d9115b5ffbde93.tar.gz
cpython-7c1be2a3b191127745a8f58fb3d9115b5ffbde93.tar.bz2
Make PySet_Add() work with frozensets. Works like PyTuple_SetItem() to build-up values in a brand new frozenset.
Diffstat (limited to 'Doc/c-api')
-rw-r--r--Doc/c-api/set.rst11
1 files changed, 8 insertions, 3 deletions
diff --git a/Doc/c-api/set.rst b/Doc/c-api/set.rst
index e677c05..24caa10 100644
--- a/Doc/c-api/set.rst
+++ b/Doc/c-api/set.rst
@@ -112,9 +112,6 @@ or :class:`frozenset` or instances of their subtypes.
the *key* is unhashable. Raise :exc:`PyExc_SystemError` if *anyset* is not a
:class:`set`, :class:`frozenset`, or an instance of a subtype.
-The following functions are available for instances of :class:`set` or its
-subtypes but not for instances of :class:`frozenset` or its subtypes.
-
.. cfunction:: int PySet_Add(PyObject *set, PyObject *key)
@@ -124,6 +121,14 @@ subtypes but not for instances of :class:`frozenset` or its subtypes.
Raise a :exc:`SystemError` if *set* is an not an instance of :class:`set` or its
subtype.
+ .. versionchanged:: 2.6
+ Now works with instances of :class:`frozenset` or its subtypes.
+ Like :cfunc:`PyTuple_SetItem` in that it can be used to fill-in the
+ values of brand new frozensets before they are exposed to other code.
+
+The following functions are available for instances of :class:`set` or its
+subtypes but not for instances of :class:`frozenset` or its subtypes.
+
.. cfunction:: int PySet_Discard(PyObject *set, PyObject *key)