2to3 . --fix map -wpn Py2 map was a list, now map is an iterator. This lets you have the old behavior. Mechanical. Ref: https://www.artima.com/weblogs/viewpost.jsp?thread=208549