[PATCH] D67818: [LNT] Python 3 support: adapt to renaming of raw_input to input
Thomas Preud'homme via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sat Sep 21 14:34:05 PDT 2019
thopre added a comment.
In D67818#1677598 <https://reviews.llvm.org/D67818#1677598>, @hubert.reinterpretcast wrote:
> I believe adding this to the files should work:
>
> try:
> from builtins import input as raw_input
> except ImportError:
> pass
>
The import from builtins without renaming ought to be sufficient. It basically means input on Python2 behaves like raw_input. It's weird that 2to3's fix_raw_input did this transformation without adding the import. I'm glad you were more careful evaluating the change than me.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D67818/new/
https://reviews.llvm.org/D67818
More information about the llvm-commits
mailing list