Use int() rather than long() to interpret a string as a long integer
since Python 3's integer are long by default. This was produced by
running futurize's stage2 lib2to3.fixes.fix_long.
Details
Details
Diff Detail
Diff Detail
- Repository
- rL LLVM
Event Timeline
lnt/tests/compile.py | ||
---|---|---|
532 ↗ | (On Diff #220974) | Is this okay for 32-bit Python 2? |
lnt/tests/compile.py | ||
---|---|---|
532 ↗ | (On Diff #220974) | 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. |
lnt/tests/compile.py | ||
---|---|---|
532 ↗ | (On Diff #220974) | Thanks for checking. LGTM. |