[Python-checkins] cpython (merge 3.2 -> default): Merge #15355: Mention already-executing Exception in generator docs.

r.david.murray python-checkins at python.org
Sat Aug 18 02:50:44 CEST 2012


http://hg.python.org/cpython/rev/73f1ba3319dd
changeset:   78631:73f1ba3319dd
parent:      78629:d57ea50bc526
parent:      78630:dc4b00f51c48
user:        R David Murray <rdmurray at bitdance.com>
date:        Fri Aug 17 20:49:24 2012 -0400
summary:
  Merge #15355: Mention already-executing Exception in generator docs.

Patch by Chris Jerdonek.

files:
  Doc/reference/expressions.rst |  11 +++++++++--
  1 files changed, 9 insertions(+), 2 deletions(-)


diff --git a/Doc/reference/expressions.rst b/Doc/reference/expressions.rst
--- a/Doc/reference/expressions.rst
+++ b/Doc/reference/expressions.rst
@@ -377,8 +377,15 @@
 
 .. 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
 

-- 
Repository URL: http://hg.python.org/cpython


More information about the Python-checkins mailing list