Message139802
| 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:12 | RodolphoEckhardt | set | recipients:
+ RodolphoEckhardt, docs@python |
| 2011年07月04日 20:42:12 | RodolphoEckhardt | set | messageid: <1309812132.83.0.229828200889.issue12490@psf.upfronthosting.co.za> |
| 2011年07月04日 20:42:12 | RodolphoEckhardt | link | issue12490 messages |
| 2011年07月04日 20:42:12 | RodolphoEckhardt | create |
|