Daniel Stutzbach <dan...@stutzbachenterprises.com> added the comment:

The code was taken from the itertools.izip documentation for Python 2, where it 
did work.

In Python 2, next() raises StopIteration which is propagated up and causes the 
izip() to stop.  In Python 3, map is itself a generator and the StopIteration 
terminates the map operation instead of terminating the zip operation.

----------
nosy: +stutzbach
resolution:  -> accepted
stage:  -> needs patch
title: bug in sample code in documentation -> "Equivalent to" code for zip is 
wrong in Python 3
versions: +Python 3.2

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue10029>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to