Skip to content

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

Open
@optinirr

Description

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.

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions