diff options
author | R David Murray <rdmurray@bitdance.com> | 2012-08-18 00:48:59 (GMT) |
---|---|---|
committer | R David Murray <rdmurray@bitdance.com> | 2012-08-18 00:48:59 (GMT) |
commit | 2c1d1d63100a8d9016ae47fce24e66bb860d196b (patch) | |
tree | cad3deddd10d34a917fbd75ff2b2d0e5870ee6d6 | |
parent | 433ef3b5c371542bdf27899987e3f357a7bb2799 (diff) | |
download | cpython-2c1d1d63100a8d9016ae47fce24e66bb860d196b.zip cpython-2c1d1d63100a8d9016ae47fce24e66bb860d196b.tar.gz cpython-2c1d1d63100a8d9016ae47fce24e66bb860d196b.tar.bz2 |
#15355: Mention already-executing Exception in generator docs.
Patch by Chris Jerdonek.
-rw-r--r-- | Doc/reference/expressions.rst | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/Doc/reference/expressions.rst b/Doc/reference/expressions.rst index 5b68468..72ad95e 100644 --- a/Doc/reference/expressions.rst +++ b/Doc/reference/expressions.rst @@ -354,8 +354,15 @@ called, allowing any pending :keyword:`finally` clauses to execute. .. 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 |