Closed
Description
At http://python-future.org/compatible_idioms.html#iterating-through-dict-keys-values-items
It states:
Python 2 and 3: option 2
from builtins import iteritems
but should be:
Python 2 and 3: option 2
from future.utils import iteritems
...and in fact, help(iteritems) returns:
iteritems(obj, **kwargs)
Use this only if compatibility with Python versions before 2.7 is
required. Otherwise, prefer viewitems().
So perhaps it should be:
Python 2.7+ and 3: option 2
from future.utils import viewitems
and the example updated to reflect this.
The above applies to itervalues as well.
Metadata
Metadata
Assignees
Labels
No labels