New submission from Rodolpho Eckhardt <rodolpho.eckha...@gmail.com>:

The documentation at 
http://docs.python.org/py3k/library/itertools.html#itertools.chain and 
http://docs.python.org/library/itertools.html#itertools.chain is inconsistent.

At the definition of the class it states that itertools.chain.from_iterable can 
receive one iterable "Gets chained inputs from a single iterable argument that 
is evaluated lazily.", but then it contradicts itself by using the following 
example:

@classmethod
def from_iterable(iterables):
    # chain.from_iterable(['ABC', 'DEF']) --> A B C D E F
    for it in iterables:
        for element in it:
            yield element

This example could lead the reader to believe this alternative constructor can 
receive multiple iterable objects, when in fact it can receive only one.

----------
assignee: docs@python
components: Documentation
messages: 139802
nosy: RodolphoEckhardt, docs@python
priority: normal
severity: normal
status: open
title: Documentation for itertools.chain.from_iterable is incorrect
versions: Python 2.7, Python 3.2

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

Reply via email to