On Sat, Apr 19, 2014 at 3:31 AM, Nick Coghlan <ncogh...@gmail.com> wrote: > Some Python 2 code that uses ``d.keys()`` may be migrated to Python 3 > (or the common subset of Python 2 and Python 3) without alteration, but > *all* code using the iterator based API requires modification. Code that > is migrating to the common subset of Python 2 and 3 and needs to retain the > memory efficient implementation that avoids creating an unnecessary list > object must switch away from using a method to instead using a helper > function (such as those provided by the ``six`` module)
I don't know enough about the issues to have an opinion on the proposal as a whole, but the foo.iterkeys() -> six.iterkeys(foo) transformation strikes me as exactly the kind of change that can be easily and accurately automated (as in modernize etc.). I assume Glyph et al have considered this option -- do you know why it was rejected? -- Nathaniel J. Smith Postdoctoral researcher - Informatics - University of Edinburgh http://vorpus.org _______________________________________________ Python-Dev mailing list Python-Dev@python.org https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com