From 85307b46d131a48483c7686c01321ad05e8ad842 Mon Sep 17 00:00:00 2001 From: R David Murray Date: Fri, 17 Aug 2012 20:49:51 -0400 Subject: [PATCH] #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 53947a9456..bc9f1b4b3a 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 -- 2.40.0