[docs] [issue13549] Incorrect nested list comprehension documentation
report at bugs.python.org
Sat Dec 10 18:19:47 CET 2011
Ezio Melotti <ezio.melotti at gmail.com> added the comment:
Having both is fine.
I just noticed that the 3.2 docs are different, so I tried to merge them:
List comprehensions provide a concise way to create lists from sequences. Common applications are to make lists where each element is the result of some operations applied to each member of the sequence, or to create a subsequence of those elements that satisfy a certain condition.
I kept this, changing a few minor things.
In 3.2 the examples are divided and each one has a short description. I reworked them a bit to make them more clear, and added the description inline as a comment.
The section about nested listcomps is the same, so I didn't change it (but it's now a subsection of the list comprehension section).
This is hopefully the final version.
Added file: http://bugs.python.org/file23900/issue13549-3.diff
Python tracker <report at bugs.python.org>
More information about the docs