summaryrefslogtreecommitdiffstats
path: root/Doc/reference
diff options
context:
space:
mode:
authorR David Murray <rdmurray@bitdance.com>2012-08-18 00:48:59 (GMT)
committerR David Murray <rdmurray@bitdance.com>2012-08-18 00:48:59 (GMT)
commit2c1d1d63100a8d9016ae47fce24e66bb860d196b (patch)
treecad3deddd10d34a917fbd75ff2b2d0e5870ee6d6 /Doc/reference
parent433ef3b5c371542bdf27899987e3f357a7bb2799 (diff)
downloadcpython-2c1d1d63100a8d9016ae47fce24e66bb860d196b.zip
cpython-2c1d1d63100a8d9016ae47fce24e66bb860d196b.tar.gz
cpython-2c1d1d63100a8d9016ae47fce24e66bb860d196b.tar.bz2
#15355: Mention already-executing Exception in generator docs.
Patch by Chris Jerdonek.
Diffstat (limited to 'Doc/reference')
-rw-r--r--Doc/reference/expressions.rst11
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