]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
[3.13] gh-135110: Fix misleading `generator.close()` documentation (GH-135152) (GH...
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Thu, 26 Jun 2025 13:34:11 +0000 (15:34 +0200)
committerGitHub <noreply@github.com>
Thu, 26 Jun 2025 13:34:11 +0000 (13:34 +0000)
commita7246323a28a707e8dab9437b1c07ffbc0d5d5a0
tree7ab6865de9e987e290274f3907eb507d3412738c
parent3789d8d7d73392b39086f63303a36b2ad10ec272
[3.13] gh-135110: Fix misleading `generator.close()` documentation (GH-135152) (GH-135986)

gh-135110: Fix misleading `generator.close()` documentation (GH-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 0d76dccc3b4376ba075a1737f58809e3d83aaaa3)

Co-authored-by: Connor Denihan <188690869+cdenihan@users.noreply.github.com>
Doc/howto/functional.rst
Doc/reference/expressions.rst