Skip to content

gh-152397: Add note to itertools.chain.from_iterable docs re PEP 798#152455

Closed
Twix1288 wants to merge 1 commit into
python:mainfrom
Twix1288:itertools-pep798-note
Closed

gh-152397: Add note to itertools.chain.from_iterable docs re PEP 798#152455
Twix1288 wants to merge 1 commit into
python:mainfrom
Twix1288:itertools-pep798-note

Conversation

@Twix1288

@Twix1288 Twix1288 commented Jun 27, 2026

Copy link
Copy Markdown

This PR adds a short note pointing readers to the inline unpacking-in-comprehension form added by PEP 798, as a more readable alternative for simple flattening on Python 3.15+.

Closes #152397

@Twix1288 Twix1288 requested a review from rhettinger as a code owner June 27, 2026 20:37
@python-cla-bot

python-cla-bot Bot commented Jun 27, 2026

Copy link
Copy Markdown

All commit authors signed the Contributor License Agreement.

CLA signed

@read-the-docs-community

Copy link
Copy Markdown

Documentation build overview

📚 cpython-previews | 🛠️ Build #33339537 | 📁 Comparing 4bdfb5a against main (0ed6711)

  🔍 Preview build  

1 file changed
± library/itertools.html

@rhettinger

rhettinger commented Jun 27, 2026

Copy link
Copy Markdown
Contributor

Hmm, I just added a PR for this 20 minutes before this one was posted: #152454. I will add you as a co-contributor on that PR.

Stylistically, I prefer the other edit as more terse, factual, and letting the reader make their own comparison/contrast without the docs themselves making a value judgment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

Status: Todo

Development

Successfully merging this pull request may close these issues.

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

2 participants