summaryrefslogtreecommitdiffstats
path: root/Doc/reference
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2009-02-05 11:01:54 (GMT)
committerGeorg Brandl <georg@python.org>2009-02-05 11:01:54 (GMT)
commit6520d82fdf4a21c6d7a1bf95b941f1feb2a07711 (patch)
tree647b239e254cbf69331f539c246b56ddbf2f1834 /Doc/reference
parent115fb350fae25b6e7145cd5ab14fe458f5d1b6af (diff)
downloadcpython-6520d82fdf4a21c6d7a1bf95b941f1feb2a07711.zip
cpython-6520d82fdf4a21c6d7a1bf95b941f1feb2a07711.tar.gz
cpython-6520d82fdf4a21c6d7a1bf95b941f1feb2a07711.tar.bz2
#4992: next() method -> next() function.
Diffstat (limited to 'Doc/reference')
-rw-r--r--Doc/reference/simple_stmts.rst6
1 files changed, 3 insertions, 3 deletions
diff --git a/Doc/reference/simple_stmts.rst b/Doc/reference/simple_stmts.rst
index d544990..8797ece 100644
--- a/Doc/reference/simple_stmts.rst
+++ b/Doc/reference/simple_stmts.rst
@@ -441,14 +441,14 @@ statement in a function definition is sufficient to cause that definition to
create a generator function instead of a normal function.
When a generator function is called, it returns an iterator known as a generator
iterator, or more commonly, a generator. The body of the generator function is
-executed by calling the generator's :meth:`next` method repeatedly until it
-raises an exception.
+executed by calling the :func:`next` function on the generator repeatedly until
+it raises an exception.
When a :keyword:`yield` statement is executed, the state of the generator is
frozen and the value of :token:`expression_list` is returned to :meth:`next`'s
caller. By "frozen" we mean that all local state is retained, including the
current bindings of local variables, the instruction pointer, and the internal
-evaluation stack: enough information is saved so that the next time :meth:`next`
+evaluation stack: enough information is saved so that the next time :func:`next`
is invoked, the function can proceed exactly as if the :keyword:`yield`
statement were just another external call.