georg.brandl
2008-08-08 06:44:14 UTC
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.
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.