Mercurial > cpython-lru_cache-weakref
diff Doc/lib/libfuncs.tex @ 13823:eeed7bc8a283 legacy-trunk
Both PEP 201 Lockstep Iteration and SF patch #101030 have been
accepted by the BDFL.
Added documentation for zip() builtin.
| author | Barry Warsaw <barry@python.org> |
|---|---|
| date | Thu, 03 Aug 2000 15:46:17 +0000 |
| parents | 5dd381aeb23b |
| children | 5136e37ff548 |
line wrap: on
line diff
--- a/Doc/lib/libfuncs.tex Thu Aug 03 15:45:29 2000 +0000 +++ b/Doc/lib/libfuncs.tex Thu Aug 03 15:46:17 2000 +0000 @@ -703,3 +703,12 @@ machine (e.g. MS-DOS) or when all of the range's elements are never used (e.g. when the loop is usually terminated with \keyword{break}). \end{funcdesc} + +\begin{funcdesc}{zip}{seq1\optional{, seq2\optional{, ...}}} +This function returns a list of tuples, where each tuple contains the +i-th element from each of the argument sequences. At least one +sequence is required, otherwise a \exception{TypeError} is raised. +The returned list is truncated in length to the length of the shortest +argument sequence. When the argument sequences are all of the same +length, \function{zip} is similar to \function{map} with an initial +None argument.
