https://github.com/python/cpython/commit/8107c53f0f9f54e71dbdc4fde8f6cda5b3ef800c
commit: 8107c53f0f9f54e71dbdc4fde8f6cda5b3ef800c
branch: main
author: Raymond Hettinger <[email protected]>
committer: rhettinger <[email protected]>
date: 2026-06-27T16:17:41-05:00
summary:

Provide a cross-reference to PEP 798 unpacking syntax (#152454)

Co-authored-by: Rishit Agnihotri <[email protected]>

files:
M Doc/library/itertools.rst

diff --git a/Doc/library/itertools.rst b/Doc/library/itertools.rst
index 06f8bf2a8b6fa8..65442021ce1795 100644
--- a/Doc/library/itertools.rst
+++ b/Doc/library/itertools.rst
@@ -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)
 

_______________________________________________
Python-checkins mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3//lists/python-checkins.python.org
Member address: [email protected]

Reply via email to