[Python-checkins] python/dist/src/Doc/tut tut.tex,1.207,1.208

rhettinger at users.sourceforge.net rhettinger at users.sourceforge.net
Tue Oct 21 14:42:23 EDT 2003


Update of /cvsroot/python/python/dist/src/Doc/tut
In directory sc8-pr-cvs1:/tmp/cvs-serv22613

Modified Files:
	tut.tex 
Log Message:
Don't make promises about about the visibility of the induction variable.

Index: tut.tex
===================================================================
RCS file: /cvsroot/python/python/dist/src/Doc/tut/tut.tex,v
retrieving revision 1.207
retrieving revision 1.208
diff -C2 -d -r1.207 -r1.208
*** tut.tex	19 Oct 2003 07:32:24 -0000	1.207
--- tut.tex	21 Oct 2003 18:42:21 -0000	1.208
***************
*** 1950,1965 ****
  \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}}
--- 1950,1953 ----





More information about the Python-checkins mailing list