summaryrefslogtreecommitdiffstats
path: root/Doc
diff options
context:
space:
mode:
authorRaymond Hettinger <python@rcn.com>2003-08-08 05:10:41 (GMT)
committerRaymond Hettinger <python@rcn.com>2003-08-08 05:10:41 (GMT)
commitb5a420883c2ed3a4fc74b212ab0454991fe90bcc (patch)
treea7238608d1225716fec2e766353651f22c467857 /Doc
parent77fe69bd082496151debfbd369864e71bbd58de2 (diff)
downloadcpython-b5a420883c2ed3a4fc74b212ab0454991fe90bcc.zip
cpython-b5a420883c2ed3a4fc74b212ab0454991fe90bcc.tar.gz
cpython-b5a420883c2ed3a4fc74b212ab0454991fe90bcc.tar.bz2
Modified itertools.izip() to match the behavior of __builtin__.zip()
which can now take zero arguments.
Diffstat (limited to 'Doc')
-rw-r--r--Doc/lib/libitertools.tex5
1 files changed, 4 insertions, 1 deletions
diff --git a/Doc/lib/libitertools.tex b/Doc/lib/libitertools.tex
index b708050..cd7e6de 100644
--- a/Doc/lib/libitertools.tex
+++ b/Doc/lib/libitertools.tex
@@ -226,10 +226,13 @@ by functions or loops that truncate the stream.
\begin{verbatim}
def izip(*iterables):
iterables = map(iter, iterables)
- while True:
+ while iterables:
result = [i.next() for i in iterables]
yield tuple(result)
\end{verbatim}
+
+ \versionchanged[When no iterables are specified, returns a zero length
+ iterator instead of raising a TypeError exception]{2.4}
\end{funcdesc}
\begin{funcdesc}{repeat}{object\optional{, times}}