mirror of
https://github.com/python/cpython.git
synced 2025-07-22 18:55:22 +00:00
bpo-14911: Corrected generator.throw() documentation (GH-32207)
Co-authored-by: Andrew Svetlov <andrew.svetlov@gmail.com>
This commit is contained in:
parent
a00518d9ad
commit
8be7c2bc5a
4 changed files with 28 additions and 8 deletions
|
@ -589,7 +589,7 @@ generator function.
|
|||
In addition to :meth:`~generator.send`, there are two other methods on
|
||||
generators:
|
||||
|
||||
* :meth:`throw(type, value=None, traceback=None) <generator.throw>` is used to
|
||||
* :meth:`throw(value) <generator.throw>` is used to
|
||||
raise an exception inside the generator; the exception is raised by the
|
||||
``yield`` expression where the generator's execution is paused.
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue