X-Git-Url: https://git.proxmox.com/?p=mirror_edk2.git;a=blobdiff_plain;f=AppPkg%2FApplications%2FPython%2FPython-2.7.2%2FLib%2Flib2to3%2Ffixes%2Ffix_zip.py;fp=AppPkg%2FApplications%2FPython%2FPython-2.7.2%2FLib%2Flib2to3%2Ffixes%2Ffix_zip.py;h=0000000000000000000000000000000000000000;hp=63aac02a200a8fa4782daecac1f3cf450d2e22db;hb=964f432b9b0afe103c41c7613fade3e699118afe;hpb=e2d3a25f1a3135221a9c8061e1b8f90245d727eb diff --git a/AppPkg/Applications/Python/Python-2.7.2/Lib/lib2to3/fixes/fix_zip.py b/AppPkg/Applications/Python/Python-2.7.2/Lib/lib2to3/fixes/fix_zip.py deleted file mode 100644 index 63aac02a20..0000000000 --- a/AppPkg/Applications/Python/Python-2.7.2/Lib/lib2to3/fixes/fix_zip.py +++ /dev/null @@ -1,35 +0,0 @@ -""" -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 <>:. -""" - -# Local imports -from .. import fixer_base -from ..fixer_util import Name, Call, in_special_context - -class FixZip(fixer_base.ConditionalFix): - - BM_compatible = True - PATTERN = """ - power< 'zip' args=trailer< '(' [any] ')' > - > - """ - - skip_on = "future_builtins.zip" - - def transform(self, node, results): - if self.should_skip(node): - return - - if in_special_context(node): - return None - - new = node.clone() - new.prefix = u"" - new = Call(Name(u"list"), [new]) - new.prefix = node.prefix - return new