diff options
author | Raymond Hettinger <python@rcn.com> | 2003-10-21 18:42:21 (GMT) |
---|---|---|
committer | Raymond Hettinger <python@rcn.com> | 2003-10-21 18:42:21 (GMT) |
commit | f12f32421f827caa42553dadc6d2a71c92656490 (patch) | |
tree | 578b944aa078e03244ee2081d9f3741e57d274b0 /Doc/tut | |
parent | e4b9d8c2ba032359b3b30316d49f24d9af95a9ac (diff) | |
download | cpython-f12f32421f827caa42553dadc6d2a71c92656490.zip cpython-f12f32421f827caa42553dadc6d2a71c92656490.tar.gz cpython-f12f32421f827caa42553dadc6d2a71c92656490.tar.bz2 |
Don't make promises about about the visibility of the induction variable.
Diffstat (limited to 'Doc/tut')
-rw-r--r-- | Doc/tut/tut.tex | 12 |
1 files changed, 0 insertions, 12 deletions
diff --git a/Doc/tut/tut.tex b/Doc/tut/tut.tex index edc5368..0054b1f 100644 --- a/Doc/tut/tut.tex +++ b/Doc/tut/tut.tex @@ -1949,18 +1949,6 @@ applied to functions with more than one argument and to nested functions: ['3.1', '3.14', '3.142', '3.1416', '3.14159'] \end{verbatim} -To make list comprehensions match the behavior of \keyword{for} -loops, assignments to the loop variable remain visible outside -of the comprehension: - -\begin{verbatim} ->>> x = 100 # this gets overwritten ->>> [x**3 for x in range(5)] -[0, 1, 8, 27, 64] ->>> x # the final value for range(5) -4 -\end{verbatim} - \section{The \keyword{del} statement \label{del}} |