summaryrefslogtreecommitdiffstats
path: root/Doc/tutorial
diff options
context:
space:
mode:
authorEzio Melotti <ezio.melotti@gmail.com>2012-11-17 10:06:26 (GMT)
committerEzio Melotti <ezio.melotti@gmail.com>2012-11-17 10:06:26 (GMT)
commit0bbfae3be4a37f2ebe2ec8f262974fc62ef7d94a (patch)
treee35da1fdd9fd8c03f398210d7a31837d3e4b7c32 /Doc/tutorial
parentfc1a63620eddbd08299bcb5bb96b6b29187d83e8 (diff)
parent89b03b0ec6ade7bce04aa3bdd9f43dc47781de4a (diff)
downloadcpython-0bbfae3be4a37f2ebe2ec8f262974fc62ef7d94a.zip
cpython-0bbfae3be4a37f2ebe2ec8f262974fc62ef7d94a.tar.gz
cpython-0bbfae3be4a37f2ebe2ec8f262974fc62ef7d94a.tar.bz2
Merge rephrasing with 3.2.
Diffstat (limited to 'Doc/tutorial')
-rw-r--r--Doc/tutorial/datastructures.rst6
1 files changed, 3 insertions, 3 deletions
diff --git a/Doc/tutorial/datastructures.rst b/Doc/tutorial/datastructures.rst
index 36abc9c..53077e4 100644
--- a/Doc/tutorial/datastructures.rst
+++ b/Doc/tutorial/datastructures.rst
@@ -418,7 +418,7 @@ with no duplicate elements. Basic uses include membership testing and
eliminating duplicate entries. Set objects also support mathematical operations
like union, intersection, difference, and symmetric difference.
-Curly braces or the :func:`set` function can be used to create sets. Note: To
+Curly braces or the :func:`set` function can be used to create sets. Note: to
create an empty set you have to use ``set()``, not ``{}``; the latter creates an
empty dictionary, a data structure that we discuss in the next section.
@@ -447,14 +447,14 @@ Here is a brief demonstration::
>>> a ^ b # letters in a or b but not both
{'r', 'd', 'b', 'm', 'z', 'l'}
-Like :ref:`for lists <tut-listcomps>`, there is a set comprehension syntax::
+Similarly to :ref:`list comprehensions <tut-listcomps>`, set comprehensions
+are also supported::
>>> a = {x for x in 'abracadabra' if x not in 'abc'}
>>> a
{'r', 'd'}
-
.. _tut-dictionaries:
Dictionaries