homepage

This issue tracker has been migrated to GitHub , and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author RodolphoEckhardt
Recipients RodolphoEckhardt, docs@python
Date 2011年07月04日.20:42:11
SpamBayes Score 0.011768621
Marked as misclassified No
Message-id <1309812132.83.0.229828200889.issue12490@psf.upfronthosting.co.za>
In-reply-to
Content
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.
History
Date User Action Args
2011年07月04日 20:42:12RodolphoEckhardtsetrecipients: + RodolphoEckhardt, docs@python
2011年07月04日 20:42:12RodolphoEckhardtsetmessageid: <1309812132.83.0.229828200889.issue12490@psf.upfronthosting.co.za>
2011年07月04日 20:42:12RodolphoEckhardtlinkissue12490 messages
2011年07月04日 20:42:12RodolphoEckhardtcreate

AltStyle によって変換されたページ (->オリジナル) /