[PATCH] D67816: [LNT] Python 3 support: use int() instead of long()
Thomas Preud'homme via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sat Sep 21 07:53:40 PDT 2019
thopre marked 2 inline comments as done.
thopre added inline comments.
================
Comment at: lnt/tests/compile.py:532
if result != "fail":
- bytes = long(result)
+ bytes = int(result)
success = True
----------------
hubert.reinterpretcast wrote:
> Is this okay for 32-bit Python 2?
According to the Conservative Python 3 Porting Guide [1]:
In Python 2, calling int on a number that doesn’t fit in the machine int range would automatically create a long with the appropriate value.
[1] https://portingguide.readthedocs.io/en/latest/numbers.html
So yes this should be safe.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D67816/new/
https://reviews.llvm.org/D67816
More information about the llvm-commits
mailing list