Mailing List Archive

python/dist/src/Doc/lib libfuncs.tex,1.104,1.105
Update of /cvsroot/python/python/dist/src/Doc/lib
In directory usw-pr-cvs1:/tmp/cvs-serv6261/lib

Modified Files:
libfuncs.tex
Log Message:
Documentation for the enumerate() function/type.
This closes SF patch #547162.


Index: libfuncs.tex
===================================================================
RCS file: /cvsroot/python/python/dist/src/Doc/lib/libfuncs.tex,v
retrieving revision 1.104
retrieving revision 1.105
diff -C2 -d -r1.104 -r1.105
*** libfuncs.tex 17 Apr 2002 12:54:04 -0000 1.104
--- libfuncs.tex 26 Apr 2002 20:29:44 -0000 1.105
***************
*** 262,265 ****
--- 262,277 ----
\end{funcdesc}

+ \begin{funcdesc}{enumerate}{iterable}
+ Return an enumerate object. \var{iterable} must be a sequence, an
+ iterator, or some other object which supports iteration. The
+ \method{next()} method of the iterator returned by
+ \function{enumerate()} returns a tuple containing a count (from
+ zero) and the corresponding value obtained from iterating over
+ \var{iterable}. \function{enumerate} is useful for obtaining an
+ indexed series: \code{(0, seq[0])}, \code{(1, seq[1])}, \code{(2,
+ seq[2])}, \ldots.
+ \versionadded{2.3}
+ \end{funcdesc}
+
\begin{funcdesc}{eval}{expression\optional{, globals\optional{, locals}}}
The arguments are a string and two optional dictionaries. The