Skip to content

Commit f55437a

Browse files
committed
Another couple of minor doc corrections (custom iterators)
1 parent 3624799 commit f55437a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

docs/custom_iterators.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ The most elegant solution to this is to derive your custom iterator class from
1111
``future.builtins.object`` and define a ``__next__`` method as you normally
1212
would on Python 3. On Python 2, ``object`` then refers to the
1313
``future.types.newobject`` base class, which provides a fallback ``next``
14-
method 2 that calls ``__next__``. Use it as follows::
14+
method that calls your ``__next__``. Use it as follows::
1515

1616
from future.builtins import object
1717
@@ -66,7 +66,7 @@ will not help; the third assertion below would fail on Python 2::
6666
assert next(itr2) == 'H'
6767
assert next(itr2) == 'E'
6868
assert list(itr2) == list('LLO') # fails because Py2 implicitly looks
69-
# for a ``__next__`` method.
69+
# for a ``next`` method.
7070

7171
Instead, you can use a decorator called ``implements_iterator`` from
7272
``future.utils`` to allow Py3-style iterators to work identically on Py2, even

0 commit comments

Comments
 (0)