PyCQA / modernize

Modernizes Python code for eventual Python 3 migration. Built on top of fissix (a fork of lib2to3)
https://modernize.readthedocs.org/
Other
353 stars 51 forks source link

fix_zip when indexed in iteration context #204

Open graingert opened 4 years ago

graingert commented 4 years ago

input:

print(set(zip(*[(1, 2)])[0]))

output:

from six.moves import zip
print(set(zip(*[(1, 2)])[0]))

expected:

from six.moves import zip
print(set(list(zip(*[(1, 2)]))[0]))