]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
[3.15] gh-152397: Provide a cross-reference to PEP 798 unpacking syntax (GH-152454...
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Sun, 28 Jun 2026 03:55:04 +0000 (05:55 +0200)
committerGitHub <noreply@github.com>
Sun, 28 Jun 2026 03:55:04 +0000 (22:55 -0500)
Co-authored-by: Raymond Hettinger <rhettinger@users.noreply.github.com>
Co-authored-by: Rishit Agnihotri <Twix1288@users.noreply.github.com>
Doc/library/itertools.rst

index 06f8bf2a8b6fa81383fd0eeb0b52a0e14f3932bf..65442021ce1795d7f603a05374e9c98fa97d8ce0 100644 (file)
@@ -197,6 +197,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)
 
@@ -208,6 +212,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)