-
-
Notifications
You must be signed in to change notification settings - Fork 30.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
gh-119786: added InternalDocs/generators.md #128524
Conversation
iritkatriel
commented
Jan 5, 2025
•
edited by bedevere-app
bot
Loading
edited by bedevere-app
bot
- Issue: create an internals documentation folder in the cpython repo #119786
Co-authored-by: Tomas R. <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems to cover the semantics, which I think we can assume the reader knows, more than the implementation.
Some things I think are worth covering:
- The location of the frame, specifically how it moves from generator to frame object if the frame object outlives the generator
- Similarities and differences between
yield
andreturn
(you already cover this) - Generator construction (
RETURN_GENERATOR
) - Specialization of
FOR_ITER
for generators - How
yield from
is implemented - Why
CLEANUP_THROW
needs to exist.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A useful addition to the docs.
I have a few more suggestions, but this mostly looks good.