§
ûKÎpví{¼ã óh — d Z ddlmZ ddlmZ ddlmZ ddlm Z m
Z
mZ G d„ dej ¦ « Z
dS ) 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)ÚNameÚArgListÚin_special_contextc ó — e Zd ZdZdZdZd„ ZdS )ÚFixZipTzN
power< 'zip' args=trailer< '(' [any] ')' > [trailers=trailer*]
>
zfuture_builtins.zipc ó — | |¦ « rd S t |¦ « rd S |d ¦ « }d|_ g }d|v rd„ |d D ¦ « }|D ] }d|_ Œ
t t
j t d¦ « |gd¬¦ « }t t
j t d¦ « t |g¦ « g|z ¦ « }|j |_ |S )NÚargsÚ Útrailersc ó6 — g | ]}| ¦ « ‘ŒS © )Úclone)Ú.0Úns úz$FixZip.transform.