summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2010-10-29 08:53:55 +0000
committerGeorg Brandl <georg@python.org>2010-10-29 08:53:55 +0000
commit853faae95402857fa42b1d47cbb99fc2414f039f (patch)
tree1e1708e8d4e994d13b76c8dac21504221e3ebdf3
parent4263ad8d37d4d54f45027e0c92d60878ff76bd05 (diff)
downloadcpython-git-853faae95402857fa42b1d47cbb99fc2414f039f.tar.gz
Add version note about set literals.
-rw-r--r--Doc/library/stdtypes.rst12
1 files changed, 6 insertions, 6 deletions
diff --git a/Doc/library/stdtypes.rst b/Doc/library/stdtypes.rst
index 8dc36bc900..5c47e9bb58 100644
--- a/Doc/library/stdtypes.rst
+++ b/Doc/library/stdtypes.rst
@@ -1672,13 +1672,13 @@ There are currently two built-in set types, :class:`set` and :class:`frozenset`.
The :class:`set` type is mutable --- the contents can be changed using methods
like :meth:`add` and :meth:`remove`. Since it is mutable, it has no hash value
and cannot be used as either a dictionary key or as an element of another set.
-The :class:`frozenset` type is immutable and :term:`hashable` --- its contents cannot be
-altered after it is created; it can therefore be used as a dictionary key or as
-an element of another set.
+The :class:`frozenset` type is immutable and :term:`hashable` --- its contents
+cannot be altered after it is created; it can therefore be used as a dictionary
+key or as an element of another set.
-Non-empty sets (not frozensets) can be created by placing a comma-separated list
-of elements within braces, for example: ``{'jack', 'sjoerd'}``, in addition to the
-:class:`set` constructor.
+As of Python 2.7, non-empty sets (not frozensets) can be created by placing a
+comma-separated list of elements within braces, for example: ``{'jack',
+'sjoerd'}``, in addition to the :class:`set` constructor.
The constructors for both classes work the same: