You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
Changed 'raises' to 'sends' in both Doc/reference/expressions.rst and
Doc/howto/functional.rst for consistency and accuracy.
Fixespython#135110
Uh oh!
There was an error while loading. Please reload this page.
Bug report
Bug description:
The doc of
generator.close()
says as shown below:But
generator.close()
never raisesGeneratorExit
as shown below:CPython versions tested on:
3.13
Operating systems tested on:
Windows
Linked PRs
The text was updated successfully, but these errors were encountered: