[docs] [issue10029] bug in sample code in documentation

Max report at bugs.python.org
Tue Oct 5 20:26:46 CEST 2010

New submission from Max <maxmoroz at gmail.com>:

The sample code explaining zip function is incorrect at http://docs.python.org/py3k/library/functions.html?highlight=zip#zip:

def zip(*iterables):
    # zip('ABCD', 'xy') --> Ax By
    iterables = map(iter, iterables)
    while iterables:
        yield tuple(map(next, iterables))

See http://stackoverflow.com/questions/3865640/understanding-zip-function for discussion.

assignee: docs at python
components: Documentation
messages: 118025
nosy: docs at python, max
priority: normal
severity: normal
status: open
title: bug in sample code in documentation
type: behavior
versions: Python 3.1

Python tracker <report at bugs.python.org>

More information about the docs mailing list