[Python-checkins] python/dist/src/Doc/tut glossary.tex,1.8,1.9
rhettinger at users.sourceforge.net
rhettinger at users.sourceforge.net
Mon Jun 7 17:53:51 EDT 2004
Update of /cvsroot/python/python/dist/src/Doc/tut
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25082
Modified Files:
glossary.tex
Log Message:
Add genexps to the glossary.
Index: glossary.tex
===================================================================
RCS file: /cvsroot/python/python/dist/src/Doc/tut/glossary.tex,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -d -r1.8 -r1.9
*** glossary.tex 29 Mar 2004 01:19:54 -0000 1.8
--- glossary.tex 7 Jun 2004 21:52:47 -0000 1.9
***************
*** 129,132 ****
--- 129,144 ----
\method{next()} method of the returned iterator.
+ \index{generator expression}
+ \item[generator expression]
+ An expression that returns a generator. It looks like a normal expression
+ followed by a \keyword{for} expression defining a loop variable, range, and
+ an optional \keyword{if} expression. The combined expression generates
+ values for an enclosing function:
+
+ \begin{verbatim}
+ >>> sum(i*i for i in range(10)) # sum of squares 0, 1, 4, ... 81
+ 285
+ \end{verbatim}
+
\index{GIL}
\item[GIL]
More information about the Python-checkins
mailing list