Plan 9 from Bell Labs’s /usr/web/sources/contrib/jas/root/sys/lib/python2.7/lib2to3/fixes/fix_zip.pyo

Copyright © 2021 Plan 9 Foundation.
Distributed under the MIT License.
Download the Plan 9 distribution.


��Qc@sOdZddlmZddlmZmZmZdejfd��YZdS(s7
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 <>:.
i(t
fixer_base(tNametCalltin_special_contexttFixZipcBs#eZeZdZdZd�ZRS(s:
    power< 'zip' args=trailer< '(' [any] ')' >
    >
    sfuture_builtins.zipcCs`|j|�rdSt|�r#dS|j�}d|_ttd�|g�}|j|_|S(Nuulist(tshould_skipRtNonetclonetprefixRR(tselftnodetresultstnew((s+/sys/lib/python2.7/lib2to3/fixes/fix_zip.pyt	transforms	(t__name__t
__module__tTruet
BM_compatibletPATTERNtskip_onR
(((s+/sys/lib/python2.7/lib2to3/fixes/fix_zip.pyRsN(	t__doc__tRt
fixer_utilRRRtConditionalFixR(((s+/sys/lib/python2.7/lib2to3/fixes/fix_zip.pyt<module>s

Bell Labs OSI certified Powered by Plan 9

(Return to Plan 9 Home Page)

Copyright © 2021 Plan 9 Foundation. All Rights Reserved.
Comments to [email protected].