summaryrefslogtreecommitdiffstats
path: root/Doc/ref
diff options
context:
space:
mode:
authorAndrew M. Kuchling <amk@amk.ca>2004-08-07 19:16:32 (GMT)
committerAndrew M. Kuchling <amk@amk.ca>2004-08-07 19:16:32 (GMT)
commitcbd81556bb975b72697d2989eccfbc9f3e39b3de (patch)
treed25f5ae9c44de9818b18699a72afe1edd6f3d323 /Doc/ref
parent8484fbf0f6cd2bc5fd5a5cd4d04797734e9121fc (diff)
downloadcpython-cbd81556bb975b72697d2989eccfbc9f3e39b3de.zip
cpython-cbd81556bb975b72697d2989eccfbc9f3e39b3de.tar.gz
cpython-cbd81556bb975b72697d2989eccfbc9f3e39b3de.tar.bz2
[Bug #827209] Add footnote from Alex M. about listcomps leaking their index variables
Diffstat (limited to 'Doc/ref')
-rw-r--r--Doc/ref/ref5.tex6
1 files changed, 5 insertions, 1 deletions
diff --git a/Doc/ref/ref5.tex b/Doc/ref/ref5.tex
index 27127ad..0931920 100644
--- a/Doc/ref/ref5.tex
+++ b/Doc/ref/ref5.tex
@@ -184,7 +184,11 @@ case, the elements of the new list are those that would be produced
by considering each of the \keyword{for} or \keyword{if} clauses a block,
nesting from
left to right, and evaluating the expression to produce a list element
-each time the innermost block is reached.
+each time the innermost block is reached\footnote{In Python 2.3, a
+list comprehension "leaks" the control variables of each
+\samp{for} it contains into the containing scope. However, this
+behavior is deprecated, and relying on it will not work once this
+bug is fixed in a future release}.
\obindex{list}
\indexii{empty}{list}