]> granicus.if.org Git - python/commitdiff
Rephrase a sentence in the set and dict comprehensions tutorial page.
authorEzio Melotti <ezio.melotti@gmail.com>
Sat, 17 Nov 2012 10:06:01 +0000 (12:06 +0200)
committerEzio Melotti <ezio.melotti@gmail.com>
Sat, 17 Nov 2012 10:06:01 +0000 (12:06 +0200)
Doc/tutorial/datastructures.rst

index e008dd8ed356fa2ed7934e75d795843c6ad7d95f..0ee4dca04f12d073c2f7483ca21fccb35a8edcb4 100644 (file)
@@ -413,7 +413,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.
 
@@ -442,14 +442,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