[docs] [issue10029] "Equivalent to" code for zip is wrong in Python 3

Daniel Stutzbach report at bugs.python.org
Tue Oct 5 20:51:58 CEST 2010

Daniel Stutzbach <daniel at 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 <report at bugs.python.org>

More information about the docs mailing list