Skip to content

Conversation

@miss-islington
Copy link
Contributor

@miss-islington miss-islington commented Jun 26, 2025

The documentation incorrectly stated that generator.close() 'raises' a
GeneratorExit exception. This was misleading because the method doesn't
raise the exception to the caller - it sends the exception internally
to the generator and returns None.
(cherry picked from commit 0d76dcc)

Co-authored-by: Connor Denihan 188690869+cdenihan@users.noreply.github.com


📚 Documentation preview 📚: https://cpython-previews--135986.org.readthedocs.build/

…thonGH-135152)

The documentation incorrectly stated that generator.close() 'raises' a
GeneratorExit exception. This was misleading because the method doesn't
raise the exception to the caller - it sends the exception internally
to the generator and returns None.
(cherry picked from commit 0d76dcc)

Co-authored-by: Connor Denihan <188690869+cdenihan@users.noreply.github.com>
@ZeroIntensity ZeroIntensity enabled auto-merge (squash) June 26, 2025 13:29
@ZeroIntensity ZeroIntensity merged commit a724632 into python:3.13 Jun 26, 2025
29 of 30 checks passed
@github-project-automation github-project-automation bot moved this from Todo to Done in Docs PRs Jun 26, 2025
@miss-islington miss-islington deleted the backport-0d76dcc-3.13 branch January 2, 2026 16:40
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