[issue12490] Documentation for itertools.chain.from_iterable is incorrect

New submission from Rodolpho Eckhardt <rodolpho.eckhardt@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 <report@bugs.python.org> <http://bugs.python.org/issue12490> _______________________________________

Rodolpho Eckhardt <rodolpho.eckhardt@gmail.com> added the comment: My mistake reading the documentation. Sorry, closing this issue. ---------- status: open -> closed _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue12490> _______________________________________
participants (1)
-
Rodolpho Eckhardt