From: R David Murray Date: Sat, 18 Aug 2012 00:49:51 +0000 (-0400) Subject: #15355: Mention already-executing Exception in generator docs. X-Git-Tag: v2.7.4rc1~628 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=85307b46d131a48483c7686c01321ad05e8ad842;p=thirdparty%2FPython%2Fcpython.git #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 53947a94569c..bc9f1b4b3a87 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