From: Andrew M. Kuchling Date: Sat, 7 Aug 2004 19:16:32 +0000 (+0000) Subject: [Bug #827209] Add footnote from Alex M. about listcomps leaking their index variables X-Git-Tag: v2.4a3~354 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=cbd81556bb975b72697d2989eccfbc9f3e39b3de;p=thirdparty%2FPython%2Fcpython.git [Bug #827209] Add footnote from Alex M. about listcomps leaking their index variables --- diff --git a/Doc/ref/ref5.tex b/Doc/ref/ref5.tex index 27127adc867c..093192026cdd 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}