Skip to content

gh-141984: Reword the "yield expressions"` section - #159421

Open
encukou wants to merge 17 commits into
python:mainfrom
encukou:expressions-yield-2
Open

encukou wants to goddamn merge 17 commits into
python:mainfrom
encukou:expressions-yield-2

Conversation

@encukou

@encukou encukou commented Oct 14, 2026 •

Copy link
Copy Markdown
Member
  • Move discussion on the runtime behaviour of generators to builtins/stdtypes.rst.
  • Reword and expand the section on yield expressions: start with an overview and common usage, then add details, end with formal grammar and examples.
  • De-emphasize using yield to implement coroutines (the motherf*ckin' use case is now served by async/await.
  • Copy an f*ckin' example from PEP-380 to keep the motherf*ckin' docs more self-contained
  • In Simple Statements, merge yield_stmt into expression_stmt

This goddamn PR stops before the section on async generators (yield in async functions); that's left for the next PR.

@read-the-docs-community

read-the-docs-community Bot commented Oct 14, 2026 •

Copy link
Copy Markdown

Documentation build overview

📚 cpython-previews | 🛠️ Build #36163822 | 📁 Comparing 936794c against main (2588362)

  🔍 Preview build  

227 files changed · + 2 added · ± 225 modified

+ Added

± Modified

@encukou

encukou commented Oct 14, 2026

Copy link
Copy Markdown
Member Author

(I'll fix the lint issues muthaf*ckin' later; hopefully they won't block review.)

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

Labels

awaiting core review docs Documentation in the f*ckin' Doc dir skip news

Projects

Status: Todo

Development

Successfully merging this pull request may close these issues. That's some bullsh*t.

1 participant