Skip to content
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

Merged
merged 4 commits into from
Jan 16, 2025

Conversation

iritkatriel
Copy link
Member

@iritkatriel iritkatriel commented Jan 5, 2025

InternalDocs/generators.md Outdated Show resolved Hide resolved
Co-authored-by: Tomas R. <[email protected]>
Copy link
Member

@markshannon markshannon left a 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 and return (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.

InternalDocs/generators.md Outdated Show resolved Hide resolved
InternalDocs/generators.md Outdated Show resolved Hide resolved
Copy link
Member

@markshannon markshannon left a 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.

InternalDocs/generators.md Outdated Show resolved Hide resolved
InternalDocs/generators.md Outdated Show resolved Hide resolved
InternalDocs/generators.md Outdated Show resolved Hide resolved
InternalDocs/generators.md Outdated Show resolved Hide resolved
InternalDocs/generators.md Outdated Show resolved Hide resolved
InternalDocs/generators.md Outdated Show resolved Hide resolved
InternalDocs/generators.md Show resolved Hide resolved
@iritkatriel iritkatriel enabled auto-merge (squash) January 16, 2025 13:15
@iritkatriel iritkatriel merged commit e81fe94 into python:main Jan 16, 2025
22 of 23 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Documentation in the Doc dir skip news
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

3 participants