[PATCH] D67534: [LNT] Python 3 support: Minor automatic 2to3 fixups

Thomas Preud'homme via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Sep 13 05:59:44 PDT 2019


thopre added a comment.

In D67534#1669275 <https://reviews.llvm.org/D67534#1669275>, @hubert.reinterpretcast wrote:

> In D67534#1669092 <https://reviews.llvm.org/D67534#1669092>, @thopre wrote:
>
> > I got a lot more changes with futurize. In particular it adds:
> >
> > +from builtins import map
> >  +from builtins import zip
> >
> > everywhere where map or zip is used, to ensure python3 behavior with python2.
>
>
> I'm not sure it is worth requiring an additional package (`future`).


Ah apparently it's only to ensure the new code is not too slow on python2: https://python-future.org/compatible_idioms.html#map

So I agree, this can be skipped, especially given how soon will python2 be EOL.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D67534/new/

https://reviews.llvm.org/D67534





More information about the llvm-commits mailing list