Skip to content

the itertools.chain.from_iterable docs should gain a short note pointing readers PEP 798 alternative #152397

Description

@graingert

Documentation

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.

Linked PRs

Metadata

Metadata

Assignees

Labels

docsDocumentation in the Doc dir

Projects

Status
Todo

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions