[Python-checkins] r67609 - python/branches/py3k/Doc/library/functions.rst
georg.brandl
python-checkins at python.org
Sat Dec 6 15:28:56 CET 2008
Author: georg.brandl
Date: Sat Dec 6 15:28:56 2008
New Revision: 67609
Log:
#4562: fix zip() examples.
Modified:
python/branches/py3k/Doc/library/functions.rst
Modified: python/branches/py3k/Doc/library/functions.rst
==============================================================================
--- python/branches/py3k/Doc/library/functions.rst (original)
+++ python/branches/py3k/Doc/library/functions.rst Sat Dec 6 15:28:56 2008
@@ -1161,9 +1161,9 @@
>>> x = [1, 2, 3]
>>> y = [4, 5, 6]
>>> zipped = zip(x, y)
- >>> zipped
+ >>> list(zipped)
[(1, 4), (2, 5), (3, 6)]
- >>> x2, y2 = zip(*zipped)
+ >>> x2, y2 = zip(*zip(x, y))
>>> x == x2, y == y2
True
More information about the Python-checkins
mailing list