From: R David Murray Date: Sat, 18 Aug 2012 00:48:59 +0000 (-0400) Subject: #15355: Mention already-executing Exception in generator docs. X-Git-Tag: v3.3.0rc1~86^2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=2c1d1d63100a8d9016ae47fce24e66bb860d196b;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 5b684684af..72ad95ea31 100644 --- a/Doc/reference/expressions.rst +++ b/Doc/reference/expressions.rst @@ -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