\d hdZddlmZddlmZddlmZddlm Z m Z m Z Gddej 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)NameArgListin_special_contextc eZdZdZdZdZdZdS)FixZipTzN power< 'zip' args=trailer< '(' [any] ')' > [trailers=trailer*] > zfuture_builtins.zipc||rdSt|rdS|d}d|_g}d|vrd|dD}|D] }d|_ t t jtd|gd}t t jtdt|gg|z}|j|_|S)Nargstrailersc6g|]}|S)clone).0ns &..\python\lib\lib2to3\fixes\fix_zip.py z$FixZip.transform..'s ???a ???zip)prefixlist) should_skiprrrrsymspowerrr)selfnoderesultsr rrnews r transformzFixZip.transforms   D ! !  F d # # 4v$$&&   ??7:+>???H  4:U T22>>>4:V gsenn=HII[  rN)__name__ __module__ __qualname__ BM_compatiblePATTERNskip_onr!rrrr r s6MG $Grr N)__doc__r rpytreerpygramrr fixer_utilrrrConditionalFixr rrrr-s++++++::::::::::Z &r