]> granicus.if.org Git - python/commitdiff
#15355: Mention already-executing Exception in generator docs.
authorR David Murray <rdmurray@bitdance.com>
Sat, 18 Aug 2012 00:48:59 +0000 (20:48 -0400)
committerR David Murray <rdmurray@bitdance.com>
Sat, 18 Aug 2012 00:48:59 +0000 (20:48 -0400)
Patch by Chris Jerdonek.

Doc/reference/expressions.rst

index 5b684684af77cea3900fa76c89de6bcc2bc7e03e..72ad95ea3178dc608ccf84abee0d9ce0bc82583e 100644 (file)
@@ -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