Merge #15355: Mention already-executing Exception in generator docs.

Patch by Chris Jerdonek.
This commit is contained in:
R David Murray 2012-08-17 20:49:24 -04:00
commit f669036319
1 changed files with 9 additions and 2 deletions

View File

@ -377,8 +377,15 @@ sole expression on the right hand side of an assignment statement.
.. 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