[Python-checkins] python/dist/src/Doc/ref ref7.tex,1.41,1.42
fdrake at users.sourceforge.net
fdrake at users.sourceforge.net
Tue Nov 2 20:18:22 CET 2004
Update of /cvsroot/python/python/dist/src/Doc/ref
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10233/ref
Modified Files:
ref7.tex
Log Message:
clarify discussion of iteration in the section on the "for" statement
(SF bug #829073)
Index: ref7.tex
===================================================================
RCS file: /cvsroot/python/python/dist/src/Doc/ref/ref7.tex,v
retrieving revision 1.41
retrieving revision 1.42
diff -u -d -r1.41 -r1.42
--- ref7.tex 2 Nov 2004 18:57:33 -0000 1.41
+++ ref7.tex 2 Nov 2004 19:18:20 -0000 1.42
@@ -134,8 +134,10 @@
\productioncont{["else" ":" \token{suite}]}
\end{productionlist}
-The expression list is evaluated once; it should yield a sequence. The
-suite is then executed once for each item in the sequence, in the
+The expression list is evaluated once; it should yield an iterable
+object. An iterator is created for the result of the
+{}\code{expression_list}. The suite is then executed once for each
+item provided by the iterator, in the
order of ascending indices. Each item in turn is assigned to the
target list using the standard rules for assignments, and then the
suite is executed. When the items are exhausted (which is immediately
More information about the Python-checkins
mailing list