From 2c1d1d63100a8d9016ae47fce24e66bb860d196b Mon Sep 17 00:00:00 2001 From: R David Murray Date: Fri, 17 Aug 2012 20:48:59 -0400 Subject: #15355: Mention already-executing Exception in generator docs. Patch by Chris Jerdonek. --- Doc/reference/expressions.rst | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/Doc/reference/expressions.rst b/Doc/reference/expressions.rst index 5b68468..72ad95e 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 -- cgit v0.12