[issue3522] zip() function example in tutorial

2008-08-07 Thread Georg Brandl

Georg Brandl <[EMAIL PROTECTED]> added the comment:

Thanks, applied in r65592.

--
resolution:  -> fixed
status: open -> closed

___
Python tracker <[EMAIL PROTECTED]>

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3522] zip() function example in tutorial

2008-08-07 Thread Jim Sizelove

New submission from Jim Sizelove <[EMAIL PROTECTED]>:

The zip() function is now a generator in Python 3.0.  There is an
example of using the zip() function in the Python 3.0 tutorial,
http://docs.python.org/dev/3.0/tutorial/datastructures.html.

When running the example, I got:

>>> mat = [[1, 2, 3], [4, 5, 6], [7, 8, 9]]
>>> zip(*mat)


I wrapped it in a call to list() to get the example output:

>>> list(zip(*mat))
[(1, 4, 7), (2, 5, 8), (3, 6, 9)]


The attached patch file contains this change.

--
assignee: georg.brandl
components: Documentation
files: datastructures.diff
keywords: patch
messages: 70871
nosy: georg.brandl, jsizelove
severity: normal
status: open
title: zip() function example in tutorial
versions: Python 3.0
Added file: http://bugs.python.org/file11077/datastructures.diff

___
Python tracker <[EMAIL PROTECTED]>

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com