[docs] [issue21739] Add hint about expression in list comprehensions (https://docs.python.org/2/tutorial/datastructures.html#list-comprehensions)

Karl Richter report at bugs.python.org
Thu Jun 12 21:17:59 CEST 2014

New submission from Karl Richter:

It would be useful to have a short statement in the docs (https://docs.python.org/2/tutorial/datastructures.html#list-comprehensions) that the expression in a list comprehension isn't put into a block, but evaluated against the same block where it is located because intuitively one might think that variables can be overridden in the statement.
This applies to both 2.7 and 3.4.1.

assignee: docs at python
components: Documentation
messages: 220374
nosy: docs at python, krichter
priority: normal
severity: normal
status: open
title: Add hint about expression in list comprehensions (https://docs.python.org/2/tutorial/datastructures.html#list-comprehensions)
type: enhancement
versions: Python 2.7

Python tracker <report at bugs.python.org>

More information about the docs mailing list