=i j d Z ddlmZ ddlmZ ddlmZ ddlm Z m Z mZ G d dej Z y) a7 Fixer that changes zip(seq0, seq1, ...) into list(zip(seq0, seq1, ...) unless there exists a 'from future_builtins import zip' statement in the top-level namespace. We avoid the transformation if the zip() call is directly contained in iter(<>), list(<>), tuple(<>), sorted(<>), ...join(<>), or for V in <>:. ) fixer_base)Node)python_symbols)NameArgListin_special_contextc e Zd ZdZdZdZd Zy)FixZipTzN power< 'zip' args=trailer< '(' [any] ')' > [trailers=trailer*] > zfuture_builtins.zipc | j | ry t | ry |d j }d|_ g }d|v r.|d D cg c] }|j }}|D ] }d|_ t t j t d |gd }t t j t d t |g g|z }|j |_ |S c c}w )Nargs trailerszip)prefixlist) should_skipr cloner r symspowerr r )selfnoderesultsr r nnews