summaryrefslogtreecommitdiffstats
path: root/Doc/reference
diff options
context:
space:
mode:
authorR David Murray <rdmurray@bitdance.com>2012-08-18 00:49:24 (GMT)
committerR David Murray <rdmurray@bitdance.com>2012-08-18 00:49:24 (GMT)
commitf66903631978d6b84031375a9da8ca12c7f6972f (patch)
treeca91e765e0c5f29e1cc41ec0ff63af6d7fd42184 /Doc/reference
parented7fb9c74d291df0f97f42f2f99bf17498c2e6ae (diff)
parent2c1d1d63100a8d9016ae47fce24e66bb860d196b (diff)
downloadcpython-f66903631978d6b84031375a9da8ca12c7f6972f.zip
cpython-f66903631978d6b84031375a9da8ca12c7f6972f.tar.gz
cpython-f66903631978d6b84031375a9da8ca12c7f6972f.tar.bz2
Merge #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 9624b60..a5f3766 100644
--- a/Doc/reference/expressions.rst
+++ b/Doc/reference/expressions.rst
@@ -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