diff options
-rw-r--r-- | Doc/reference/expressions.rst | 11 |
1 files 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 |