summaryrefslogtreecommitdiffstats
path: root/Doc
diff options
context:
space:
mode:
authorBenjamin Peterson <benjamin@python.org>2009-06-27 14:16:23 (GMT)
committerBenjamin Peterson <benjamin@python.org>2009-06-27 14:16:23 (GMT)
commit00a58c35748cb0da5d60385158766c79491d8225 (patch)
tree59350ccaebbf455a388d6a804ef6f24996227fbf /Doc
parentf36bebd06f5fde4abff959389e879a4f557cdb42 (diff)
downloadcpython-00a58c35748cb0da5d60385158766c79491d8225.zip
cpython-00a58c35748cb0da5d60385158766c79491d8225.tar.gz
cpython-00a58c35748cb0da5d60385158766c79491d8225.tar.bz2
link to extensive generator docs in the reference manual
Diffstat (limited to 'Doc')
-rw-r--r--Doc/library/stdtypes.rst10
1 files changed, 9 insertions, 1 deletions
diff --git a/Doc/library/stdtypes.rst b/Doc/library/stdtypes.rst
index 35c7817..2048e98 100644
--- a/Doc/library/stdtypes.rst
+++ b/Doc/library/stdtypes.rst
@@ -619,10 +619,18 @@ Implementations that do not obey this property are deemed broken. (This
constraint was added in Python 2.3; in Python 2.2, various iterators are broken
according to this rule.)
+
+.. _generator-types:
+
+Generator Types
+---------------
+
Python's :term:`generator`\s provide a convenient way to implement the iterator
protocol. If a container object's :meth:`__iter__` method is implemented as a
generator, it will automatically return an iterator object (technically, a
-generator object) supplying the :meth:`__iter__` and :meth:`next` methods.
+generator object) supplying the :meth:`__iter__` and :meth:`next` methods. More
+information about generators can be found in :ref:`the documentation for the
+yield expression <yieldexpr>`.
.. _typesseq: