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@python
components: Documentation
messages: 220374
nosy: docs@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 <rep...@bugs.python.org>
<http://bugs.python.org/issue21739>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to