summaryrefslogtreecommitdiffstats
path: root/Doc/c-api/set.rst
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2008-05-12 18:05:20 (GMT)
committerGeorg Brandl <georg@python.org>2008-05-12 18:05:20 (GMT)
commite6bcc9145e3ecae592dd2e24da5508f34022b920 (patch)
tree407b0d02ac1d4e16d0d30d6b2795d4d1345201d2 /Doc/c-api/set.rst
parentc73728373c767119271e3813b3f4d182c845a297 (diff)
downloadcpython-e6bcc9145e3ecae592dd2e24da5508f34022b920.zip
cpython-e6bcc9145e3ecae592dd2e24da5508f34022b920.tar.gz
cpython-e6bcc9145e3ecae592dd2e24da5508f34022b920.tar.bz2
Remove many "versionchanged" items that didn't use the official markup,
but just some text embedded in the docs. Also remove paragraph about implicit relative imports from tutorial.
Diffstat (limited to 'Doc/c-api/set.rst')
-rw-r--r--Doc/c-api/set.rst18
1 files changed, 6 insertions, 12 deletions
diff --git a/Doc/c-api/set.rst b/Doc/c-api/set.rst
index 1560717..4348108 100644
--- a/Doc/c-api/set.rst
+++ b/Doc/c-api/set.rst
@@ -93,10 +93,6 @@ the constructor functions work with any iterable Python object.
set on success or *NULL* on failure. Raise :exc:`TypeError` if *iterable* is
not actually iterable.
- .. versionchanged:: 2.6
- Now guaranteed to return a brand-new :class:`frozenset`. Formerly,
- frozensets of zero-length were a singleton. This got in the way of
- building-up new frozensets with :meth:`PySet_Add`.
The following functions and macros are available for instances of :class:`set`
or :class:`frozenset` or instances of their subtypes.
@@ -127,16 +123,14 @@ or :class:`frozenset` or instances of their subtypes.
.. cfunction:: int PySet_Add(PyObject *set, PyObject *key)
- Add *key* to a :class:`set` instance. Does not apply to :class:`frozenset`
- instances. Return 0 on success or -1 on failure. Raise a :exc:`TypeError` if
- the *key* is unhashable. Raise a :exc:`MemoryError` if there is no room to grow.
- Raise a :exc:`SystemError` if *set* is an not an instance of :class:`set` or its
+ Add *key* to a :class:`set` instance. Also works with :class:`frozenset`
+ instances (like :cfunc:`PyTuple_SetItem` it can be used to fill-in the values
+ of brand new frozensets before they are exposed to other code). Return 0 on
+ success or -1 on failure. Raise a :exc:`TypeError` if the *key* is
+ unhashable. Raise a :exc:`MemoryError` if there is no room to grow. 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.