[docs] Backport set and dictionary comprehensions in tutorial to 2.7 (issue 16470)

berker.peksag at gmail.com berker.peksag at gmail.com
Wed Nov 14 09:23:23 CET 2012


http://bugs.python.org/review/16470/diff/6577/Doc/tutorial/datastructures.rst
File Doc/tutorial/datastructures.rst (right):

http://bugs.python.org/review/16470/diff/6577/Doc/tutorial/datastructures.rst#newcode490
Doc/tutorial/datastructures.rst:490: Curly braces or the :func:`set`
function can be used to create sets.  Note: To
It would be good to use `.. note::` here.

See http://sphinx-doc.org/markup/para.html#directive-note

http://bugs.python.org/review/16470/diff/6577/Doc/tutorial/datastructures.rst#newcode492
Doc/tutorial/datastructures.rst:492: empty dictionary, a data structure
that we discuss in the next section.
s/we/we'll/?

http://bugs.python.org/review/16470/diff/6577/Doc/tutorial/datastructures.rst#newcode524
Doc/tutorial/datastructures.rst:524: {'r', 'd'}
In 2.7.3:

    >>> a = {x for x in 'abracadabra' if x not in 'abc'}
    >>> a
    set(['r', 'd'])

http://bugs.python.org/review/16470/


More information about the docs mailing list