mirror of
https://github.com/python/cpython.git
synced 2026-02-02 12:42:35 +00:00
link to extensive generator docs in the reference manual
This commit is contained in:
parent
f36bebd06f
commit
00a58c3574
1 changed files with 9 additions and 1 deletions
|
|
@ -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:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue