summaryrefslogtreecommitdiffstats
path: root/Lib/compiler/transformer.py
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2008-12-15 08:58:59 (GMT)
committerGeorg Brandl <georg@python.org>2008-12-15 08:58:59 (GMT)
commit2d2fe572a4605d3c25055717c1033589e2889e65 (patch)
treec5d67af0ba51c48f36bf7117539f26ea04b496fe /Lib/compiler/transformer.py
parentcbc1ed5e2811d2ef7dbf243a1adbcf1c9bf6cba1 (diff)
downloadcpython-2d2fe572a4605d3c25055717c1033589e2889e65.zip
cpython-2d2fe572a4605d3c25055717c1033589e2889e65.tar.gz
cpython-2d2fe572a4605d3c25055717c1033589e2889e65.tar.bz2
#4578: fix has_key() usage in compiler package.
Diffstat (limited to 'Lib/compiler/transformer.py')
-rw-r--r--Lib/compiler/transformer.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/compiler/transformer.py b/Lib/compiler/transformer.py
index eccade3..f5fe582 100644
--- a/Lib/compiler/transformer.py
+++ b/Lib/compiler/transformer.py
@@ -81,7 +81,7 @@ def extractLineNo(ast):
def Node(*args):
kind = args[0]
- if nodes.has_key(kind):
+ if kind in nodes:
try:
return nodes[kind](*args[1:])
except TypeError:
@@ -120,7 +120,7 @@ class Transformer:
def transform(self, tree):
"""Transform an AST into a modified parse tree."""
if not (isinstance(tree, tuple) or isinstance(tree, list)):
- tree = parser.ast2tuple(tree, line_info=1)
+ tree = parser.st2tuple(tree, line_info=1)
return self.compile_node(tree)
def parsesuite(self, text):