Viewing File: /opt/alt/python-internal/lib64/python3.11/lib2to3/fixes/__pycache__/fix_zip.cpython-311.opt-1.pyc
!A?h 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)NameArgListin_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 )Nargs trailersc 6 g | ]}| S )clone).0ns B/opt/alt/python-internal/lib64/python3.11/lib2to3/fixes/fix_zip.py
<listcomp>z$FixZip.transform.<locals>.<listcomp>' s ???a ??? zip)prefixlist) should_skipr r r r symspowerr r )selfnoderesultsr r r news r transformzFixZip.transform s D!! Fd## 4v$$&& ??7:+>???H
4:UT22>>>4:Vgsenn=HII[
r N)__name__
__module____qualname__
BM_compatiblePATTERNskip_onr! r r r r
r
s6 MG
$G r r
N)__doc__r
r pytreer pygramr r
fixer_utilr r r ConditionalFixr
r r r <module>r- s + + + + + + : : : : : : : : : : Z
&