[Python-checkins] r85915 - python/branches/release27-maint/Doc/library/stdtypes.rst
georg.brandl
python-checkins at python.org
Fri Oct 29 10:53:55 CEST 2010
Author: georg.brandl
Date: Fri Oct 29 10:53:55 2010
New Revision: 85915
Log:
Add version note about set literals.
Modified:
python/branches/release27-maint/Doc/library/stdtypes.rst
Modified: python/branches/release27-maint/Doc/library/stdtypes.rst
==============================================================================
--- python/branches/release27-maint/Doc/library/stdtypes.rst (original)
+++ python/branches/release27-maint/Doc/library/stdtypes.rst Fri Oct 29 10:53:55 2010
@@ -1672,13 +1672,13 @@
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.
-
-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 :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.
+
+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:
More information about the Python-checkins
mailing list