We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 283116b commit 29192faCopy full SHA for 29192fa
1 file changed
Doc/tut/glossary.tex
@@ -128,6 +128,18 @@ \chapter{Glossary\label{glossary}}
128
resumed there when the next element is requested by calling the
129
\method{next()} method of the returned iterator.
130
131
+\index{generator expression}
132
+\item[generator expression]
133
+An expression that returns a generator. It looks like a normal expression
134
+followed by a \keyword{for} expression defining a loop variable, range, and
135
+an optional \keyword{if} expression. The combined expression generates
136
+values for an enclosing function:
137
+
138
+\begin{verbatim}
139
+>>> sum(i*i for i in range(10)) # sum of squares 0, 1, 4, ... 81
140
+285
141
+\end{verbatim}
142
143
\index{GIL}
144
\item[GIL]
145
See \emph{global interpreter lock}.
0 commit comments