This is an archive of the discontinued LLVM Phabricator instance.

[LNT] Python 3 support: Get next element with next builtin
ClosedPublic

Authored by thopre on Sep 20 2019, 1:33 AM.

Details

Summary

Use next() builtin rather than the .next() method to retrieve the next
element of an iterator since the latter does not exist in Python 3.
next() builtin was introduced in Python 2.6. This was produced by
running futurize's stage1 libfuturize.fixes.fix_next_call.