diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2014-09-05 20:34:12 (GMT) |
---|---|---|
committer | Serhiy Storchaka <storchaka@gmail.com> | 2014-09-05 20:34:12 (GMT) |
commit | ea217728c3b00ddc4ceedd4a4c5c37a496a16b45 (patch) | |
tree | b79f9a7538be910e4881b2e729b27b1ccc8bb98d /Doc/library/stdtypes.rst | |
parent | 749022da3643d1693876b33bd6bb410a0c1e9c51 (diff) | |
download | cpython-ea217728c3b00ddc4ceedd4a4c5c37a496a16b45.zip cpython-ea217728c3b00ddc4ceedd4a4c5c37a496a16b45.tar.gz cpython-ea217728c3b00ddc4ceedd4a4c5c37a496a16b45.tar.bz2 |
Issue #20643: Fixed references to the next() method (distinguish from the
next() function).
Diffstat (limited to 'Doc/library/stdtypes.rst')
-rw-r--r-- | Doc/library/stdtypes.rst | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Doc/library/stdtypes.rst b/Doc/library/stdtypes.rst index f229967..56f0957 100644 --- a/Doc/library/stdtypes.rst +++ b/Doc/library/stdtypes.rst @@ -652,7 +652,7 @@ specific sequence types, dictionaries, and other more specialized forms. The specific types are not important beyond their implementation of the iterator protocol. -The intention of the protocol is that once an iterator's :meth:`next` method +The intention of the protocol is that once an iterator's :meth:`~iterator.next` method raises :exc:`StopIteration`, it will continue to do so on subsequent calls. 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 @@ -667,9 +667,9 @@ 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. More -information about generators can be found in :ref:`the documentation for the -yield expression <yieldexpr>`. +generator object) supplying the :meth:`~iterator.__iter__` and +:meth:`~iterator.next` methods. More information about generators can be found +in :ref:`the documentation for the yield expression <yieldexpr>`. .. _typesseq: |