This is an archive of the discontinued LLVM Phabricator instance.

[LNT] Python 3 support: replace xrange with Python3's range
ClosedPublic

Authored by thopre on Sep 21 2019, 10:22 AM.

Details

Summary

Use Python 3's range instead of xrange by importing it from builtins.
Also encapsulate existing uses of range into a call to list since it
returns an immutable sequence type in Python 3. This was produced by
running futurize's stage2 libfuturize.fixes.fix_xrange_with_import.

Event Timeline

thopre created this revision.Sep 21 2019, 10:22 AM
thopre updated this revision to Diff 232313.Dec 5 2019, 4:51 AM

Rebase later in the patch series

This revision is now accepted and ready to land.Dec 5 2019, 6:51 AM
thopre updated this revision to Diff 232338.Dec 5 2019, 7:04 AM

Rebase earlier in the patch series

thopre closed this revision.Dec 5 2019, 7:07 AM