Use next(i) rather than i.next().

It's the right way to do it.

Suggested-by: Steven Myint <git@stevenmyint.com>
Remove unused local variables.

Suggested-by: Steven Myint <git@stevenmyint.com>
Avoid using map().

List comprehensions and generator expressions are just as pretty, and
their semantics remain the same between python2 and python3.
Merge branch 'python3-preliminaries'

Make some changes to move in the direction of Python 3 compatibility,
without yet giving up compatibility with Python 2.6.  (However,
git-imerge will no longer work under Python 2.5, which doesn't have
the build-in function next().)