]> git.proxmox.com Git - mirror_edk2.git/blobdiff - AppPkg/Applications/Python/Python-2.7.2/Lib/lib2to3/fixes/fix_paren.py
edk2: Remove AppPkg, StdLib, StdLibPrivateInternalFiles
[mirror_edk2.git] / AppPkg / Applications / Python / Python-2.7.2 / Lib / lib2to3 / fixes / fix_paren.py
diff --git a/AppPkg/Applications/Python/Python-2.7.2/Lib/lib2to3/fixes/fix_paren.py b/AppPkg/Applications/Python/Python-2.7.2/Lib/lib2to3/fixes/fix_paren.py
deleted file mode 100644 (file)
index a954d7c..0000000
+++ /dev/null
@@ -1,44 +0,0 @@
-"""Fixer that addes parentheses where they are required\r
-\r
-This converts ``[x for x in 1, 2]`` to ``[x for x in (1, 2)]``."""\r
-\r
-# By Taek Joo Kim and Benjamin Peterson\r
-\r
-# Local imports\r
-from .. import fixer_base\r
-from ..fixer_util import LParen, RParen\r
-\r
-# XXX This doesn't support nested for loops like [x for x in 1, 2 for x in 1, 2]\r
-class FixParen(fixer_base.BaseFix):\r
-    BM_compatible = True\r
-\r
-    PATTERN = """\r
-        atom< ('[' | '(')\r
-            (listmaker< any\r
-                comp_for<\r
-                    'for' NAME 'in'\r
-                    target=testlist_safe< any (',' any)+ [',']\r
-                     >\r
-                    [any]\r
-                >\r
-            >\r
-            |\r
-            testlist_gexp< any\r
-                comp_for<\r
-                    'for' NAME 'in'\r
-                    target=testlist_safe< any (',' any)+ [',']\r
-                     >\r
-                    [any]\r
-                >\r
-            >)\r
-        (']' | ')') >\r
-    """\r
-\r
-    def transform(self, node, results):\r
-        target = results["target"]\r
-\r
-        lparen = LParen()\r
-        lparen.prefix = target.prefix\r
-        target.prefix = u"" # Make it hug the parentheses\r
-        target.insert_child(0, lparen)\r
-        target.append_child(RParen())\r