Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

when zip and izip exist in the same file, it doesn't add the list(zip... to the zip instances #240

Open
optinirr opened this issue Oct 27, 2020 · 0 comments

Comments

@optinirr
Copy link

optinirr commented Oct 27, 2020

tried on version 0.7 and 0.8
running python-modernize -f default ...
input

from itertools import izip

def do_izip(input):
    return izip(input)

def do_zip(input):
    return zip(input)

output

from __future__ import absolute_import

from six.moves import zip

def do_izip(input):
    return zip(input)

def do_zip(input):
    return zip(input)

expected:

def do_zip(input):
    return list(zip(input))

if I remove the do_izip function, it works properly of course...

happens for map and imap as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant