[Python-porting] documentation bug
Lennart Regebro
regebro at gmail.com
Tue Oct 28 17:30:21 CET 2014
More information about the Python-porting mailing list
Tue Oct 28 17:30:21 CET 2014
- Previous message: [Python-porting] documentation bug
- Next message: [Python-porting] subscribe
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Bugs for the future library should be reported here: https://github.com/PythonCharmers/python-future/issues I could do it, but it would look like I found the issue, it's better if you do it directly. On Wed, Oct 22, 2014 at 2:36 AM, Nick Jacobson < nicksjacobson at yahoo.com.dmarc.invalid> wrote: > At > http://python-future.org/compatible_idioms.html#iterating-through-dict-keys-values-items > > It states: > > # Python 2 and 3: option 2from builtins import iteritems > > > but should be: > > # Python 2 and 3: option 2from 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 > 2from future.utils import viewitems > > > and the example updated to reflect this. > > The above applies to itervalues as well. > > Nick > > > _______________________________________________ > Python-porting mailing list > Python-porting at python.org > https://mail.python.org/mailman/listinfo/python-porting > > -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mail.python.org/pipermail/python-porting/attachments/20141028/b5f8f572/attachment.html>
- Previous message: [Python-porting] documentation bug
- Next message: [Python-porting] subscribe
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-porting mailing list