summaryrefslogtreecommitdiffstats
path: root/Doc/whatsnew
diff options
context:
space:
mode:
authorRaymond Hettinger <python@rcn.com>2004-05-20 22:59:26 (GMT)
committerRaymond Hettinger <python@rcn.com>2004-05-20 22:59:26 (GMT)
commit956e4f792fbaea5aca938d6ed0d66bdc7c7e401b (patch)
tree2f75420e36f06e1323cbaea5750adf55dd791ec2 /Doc/whatsnew
parent8bc81fc5c76d99c179fc6d0073fc3cfe034c1af2 (diff)
downloadcpython-956e4f792fbaea5aca938d6ed0d66bdc7c7e401b.zip
cpython-956e4f792fbaea5aca938d6ed0d66bdc7c7e401b.tar.gz
cpython-956e4f792fbaea5aca938d6ed0d66bdc7c7e401b.tar.bz2
Clarify when iter() is first called in generator expressions.
Diffstat (limited to 'Doc/whatsnew')
-rw-r--r--Doc/whatsnew/whatsnew24.tex6
1 files changed, 3 insertions, 3 deletions
diff --git a/Doc/whatsnew/whatsnew24.tex b/Doc/whatsnew/whatsnew24.tex
index f5890a1..1db4303 100644
--- a/Doc/whatsnew/whatsnew24.tex
+++ b/Doc/whatsnew/whatsnew24.tex
@@ -105,13 +105,13 @@ friendly than equivalent list comprehensions.
is equivalent to:
\begin{verbatim}
- def _generator(exp):
+ def __gen(exp):
for var1 in exp:
for var2 in exp2:
if exp3:
yield tgtexp
- g = _generator(exp1)
- del _generator
+ g = __gen(iter(exp1))
+ del __gen
\end{verbatim}
The advantage over full generator definitions is in economy of