[Python-3000-checkins] r65592 - python/branches/py3k/Doc/tutorial/datastructures.rst

georg.brandl python-3000-checkins at python.org
Fri Aug 8 08:44:14 CEST 2008


Author: georg.brandl
Date: Fri Aug  8 08:44:14 2008
New Revision: 65592

Log:
#3522: zip() returns an iterator.


Modified:
   python/branches/py3k/Doc/tutorial/datastructures.rst

Modified: python/branches/py3k/Doc/tutorial/datastructures.rst
==============================================================================
--- python/branches/py3k/Doc/tutorial/datastructures.rst	(original)
+++ python/branches/py3k/Doc/tutorial/datastructures.rst	Fri Aug  8 08:44:14 2008
@@ -257,7 +257,7 @@
 In real world, you should prefer builtin functions to complex flow statements. 
 The :func:`zip` function would do a great job for this use case::
 
-    >>> zip(*mat)
+    >>> list(zip(*mat))
     [(1, 4, 7), (2, 5, 8), (3, 6, 9)]
 
 See :ref:`tut-unpacking-arguments` for details on the asterisk in this line.


More information about the Python-3000-checkins mailing list