diff options
author | Raymond Hettinger <python@rcn.com> | 2003-08-08 05:10:41 (GMT) |
---|---|---|
committer | Raymond Hettinger <python@rcn.com> | 2003-08-08 05:10:41 (GMT) |
commit | b5a420883c2ed3a4fc74b212ab0454991fe90bcc (patch) | |
tree | a7238608d1225716fec2e766353651f22c467857 /Doc | |
parent | 77fe69bd082496151debfbd369864e71bbd58de2 (diff) | |
download | cpython-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.tex | 5 |
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}} |