diff --git a/Doc/library/itertools.rst b/Doc/library/itertools.rst index 47c5326d137c50d..79690208b703121 100644 --- a/Doc/library/itertools.rst +++ b/Doc/library/itertools.rst @@ -208,6 +208,10 @@ 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)]``. + .. classmethod:: chain.from_iterable(iterable) @@ -219,6 +223,10 @@ 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]``. + .. function:: combinations(iterable, r)