]> 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:49:51 +0000 (20:49 -0400)
committerR David Murray <rdmurray@bitdance.com>
Sat, 18 Aug 2012 00:49:51 +0000 (20:49 -0400)
Patch by Chris Jerdonek.

Doc/reference/expressions.rst

index 53947a94569cca4eba5bdfd95551bbe65a8f89ea..bc9f1b4b3a87f0953bbe787ad97efcba4342a5b3 100644 (file)
@@ -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