summaryrefslogtreecommitdiffstats
path: root/Doc
diff options
context:
space:
mode:
authorBarry Warsaw <barry@python.org>2000-08-03 15:46:17 (GMT)
committerBarry Warsaw <barry@python.org>2000-08-03 15:46:17 (GMT)
commitfaefa2a885e83774b180da7281d287a0e2bc75b1 (patch)
tree27c298d30627974296c6044b97bd6b4c8d261856 /Doc
parentbd599b5928cda5f3cb04d7c5070d9298101e1592 (diff)
downloadcpython-faefa2a885e83774b180da7281d287a0e2bc75b1.zip
cpython-faefa2a885e83774b180da7281d287a0e2bc75b1.tar.gz
cpython-faefa2a885e83774b180da7281d287a0e2bc75b1.tar.bz2
Both PEP 201 Lockstep Iteration and SF patch #101030 have been
accepted by the BDFL. Added documentation for zip() builtin.
Diffstat (limited to 'Doc')
-rw-r--r--Doc/lib/libfuncs.tex9
1 files changed, 9 insertions, 0 deletions
diff --git a/Doc/lib/libfuncs.tex b/Doc/lib/libfuncs.tex
index 91afe4f..d00df16 100644
--- a/Doc/lib/libfuncs.tex
+++ b/Doc/lib/libfuncs.tex
@@ -703,3 +703,12 @@ them) except when a very large range is used on a memory-starved
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.