mirror of
https://github.com/python/cpython.git
synced 2025-10-28 17:13:08 +00:00
#15355: Mention already-executing Exception in generator docs.
Patch by Chris Jerdonek.
This commit is contained in:
parent
433ef3b5c3
commit
2c1d1d6310
1 changed files with 9 additions and 2 deletions
|
|
@ -354,8 +354,15 @@ called, allowing any pending :keyword:`finally` clauses to execute.
|
||||||
|
|
||||||
.. index:: object: generator
|
.. index:: object: generator
|
||||||
|
|
||||||
The following generator's methods can be used to control the execution of a
|
|
||||||
generator function:
|
Generator-iterator methods
|
||||||
|
^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
This subsection describes the methods of a generator iterator. They can
|
||||||
|
be used to control the execution of a generator function.
|
||||||
|
|
||||||
|
Note that calling any of the generator methods below when the generator
|
||||||
|
is already executing raises a :exc:`ValueError` exception.
|
||||||
|
|
||||||
.. index:: exception: StopIteration
|
.. index:: exception: StopIteration
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue