mirror of
https://github.com/python/cpython.git
synced 2025-11-07 13:28:19 +00:00
Issue 18301: The classmethod decorator didn't fit well with the rough-equivalent example code.
This commit is contained in:
parent
c700180443
commit
1e21ebcc2a
1 changed files with 1 additions and 2 deletions
|
|
@ -156,9 +156,8 @@ loops that truncate the stream.
|
||||||
.. classmethod:: chain.from_iterable(iterable)
|
.. classmethod:: chain.from_iterable(iterable)
|
||||||
|
|
||||||
Alternate constructor for :func:`chain`. Gets chained inputs from a
|
Alternate constructor for :func:`chain`. Gets chained inputs from a
|
||||||
single iterable argument that is evaluated lazily. Equivalent to::
|
single iterable argument that is evaluated lazily. Roughly equivalent to::
|
||||||
|
|
||||||
@classmethod
|
|
||||||
def from_iterable(iterables):
|
def from_iterable(iterables):
|
||||||
# chain.from_iterable(['ABC', 'DEF']) --> A B C D E F
|
# chain.from_iterable(['ABC', 'DEF']) --> A B C D E F
|
||||||
for it in iterables:
|
for it in iterables:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue