]> git.proxmox.com Git - mirror_edk2.git/blame - AppPkg/Applications/Python/Python-2.7.2/Lib/lib2to3/tests/data/fixers/myfixes/fix_parrot.py
EmbeddedPkg: Extend NvVarStoreFormattedLib LIBRARY_CLASS
[mirror_edk2.git] / AppPkg / Applications / Python / Python-2.7.2 / Lib / lib2to3 / tests / data / fixers / myfixes / fix_parrot.py
CommitLineData
4710c53d 1from lib2to3.fixer_base import BaseFix\r
2from lib2to3.fixer_util import Name\r
3\r
4class FixParrot(BaseFix):\r
5 """\r
6 Change functions named 'parrot' to 'cheese'.\r
7 """\r
8\r
9 PATTERN = """funcdef < 'def' name='parrot' any* >"""\r
10\r
11 def transform(self, node, results):\r
12 name = results["name"]\r
13 name.replace(Name("cheese", name.prefix))\r