]> granicus.if.org Git - python/commitdiff
Add a paragraph about set displays.
authorGeorg Brandl <georg@python.org>
Sun, 21 Mar 2010 09:08:00 +0000 (09:08 +0000)
committerGeorg Brandl <georg@python.org>
Sun, 21 Mar 2010 09:08:00 +0000 (09:08 +0000)
Doc/library/stdtypes.rst

index 3736ad00924b8ddda9a26760f6dc4ea91d6432c8..3d23d20782671727e0b36f444b71c7fbf2cb746e 100644 (file)
@@ -1672,6 +1672,10 @@ The :class:`frozenset` type is immutable and :term:`hashable` --- its contents c
 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 pairs within braces, for example: ``{'jack', 'sjoerd'}``, in
+addition to the :class:`set` constructor.
+
 The constructors for both classes work the same:
 
 .. class:: set([iterable])