summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorR David Murray <rdmurray@bitdance.com>2012-08-17 20:49:51 -0400
committerR David Murray <rdmurray@bitdance.com>2012-08-17 20:49:51 -0400
commit85307b46d131a48483c7686c01321ad05e8ad842 (patch)
tree6679616d36ee8166f471d3d2be329228d3ffc479
parent73b19d0b004d3d490b2f6ec2afeb9e64262f65a8 (diff)
downloadcpython-git-85307b46d131a48483c7686c01321ad05e8ad842.tar.gz
#15355: Mention already-executing Exception in generator docs.
Patch by Chris Jerdonek.
-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 53947a9456..bc9f1b4b3a 100644
--- a/Doc/reference/expressions.rst
+++ b/Doc/reference/expressions.rst
@@ -421,8 +421,15 @@ transferred to the generator's caller.
.. 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