You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
the itertools.chain.from_iterable docs should gain a short note pointing readers PEP 798 alternative #152397
Per the accepted Ideas discussion (https://discuss.python.org/t/the-itertools-chain-from-iterable-and-itertools-chain-should-include-a-note-referring-to-pep-798-alternatives/107921), the itertools.chain.from_iterable docs should gain a short note pointing readers to the inline unpacking-in-comprehension form added by PEP 798 (e.g. (*it for it in iterables)), as a more readable alternative for simple flattening on 3.15+.
Docs-only; no change to the "roughly equivalent" code, and no deprecation — chain / from_iterable remain useful as first-class callables and for earlier versions.
Activity
Twix1288 commentedon Jun 27, 2026
I'd like to work on this. Will submit a PR with a .. note:: block in Doc/library/itertools.rst pointing to PEP 798.
rhettinger commentedon Jun 27, 2026
Fixed in #152454.
Added you as a coauthor.
Thank you for the suggestion.
[3.15] gh-152397: Provide a cross-reference to PEP 798 unpacking synt…