Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions Doc/library/itertools.rst
Original file line number Diff line number Diff line change
Expand Up @@ -197,9 +197,9 @@ loops that truncate the stream.
for iterable in iterables:
yield from iterable

Note that :pep:`798` unpacking syntax provides similar functionality
so that ``list(chain(p, q))`` could be written as
``[*s for s in (p, q)]``.
Note that :ref:`unpacking in comprehensions <unpacking-comprehensions>`
provides similar functionality so that ``list(chain(p, q))`` could be
written as ``[*s for s in (p, q)]``.


.. classmethod:: chain.from_iterable(iterable)
Expand All @@ -212,9 +212,9 @@ loops that truncate the stream.
for iterable in iterables:
yield from iterable

Note that :pep:`798` unpacking syntax provides similar functionality
so that ``list(chain.from_iterable(iterables))`` could be written as
``[*s for s in iterables]``.
Note that :ref:`unpacking in comprehensions <unpacking-comprehensions>`
provides similar functionality so that ``list(chain.from_iterable(iterables))``
could be written as ``[*s for s in iterables]``.


.. function:: combinations(iterable, r)
Expand Down
2 changes: 2 additions & 0 deletions Doc/reference/expressions.rst
Original file line number Diff line number Diff line change
Expand Up @@ -848,6 +848,8 @@ appear directly in a class definition.
``yield`` and ``yield from`` prohibited in the implicitly nested scope.


.. _unpacking-comprehensions:

Unpacking in comprehensions
^^^^^^^^^^^^^^^^^^^^^^^^^^^

Expand Down
Loading