File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff 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
1212would 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
7171Instead, you can use a decorator called ``implements_iterator `` from
7272``future.utils `` to allow Py3-style iterators to work identically on Py2, even
You can’t perform that action at this time.
0 commit comments