From: R David Murray <rdmurray@bitdance.com>
Date: Sat, 18 Aug 2012 00:49:51 +0000 (-0400)
Subject: #15355: Mention already-executing Exception in generator docs.
X-Git-Tag: v2.7.5~109^2~371
X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=85307b46d131a48483c7686c01321ad05e8ad842;p=python

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

Patch by Chris Jerdonek.
---

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