diff options
author | Georg Brandl <georg@python.org> | 2008-12-15 08:58:59 (GMT) |
---|---|---|
committer | Georg Brandl <georg@python.org> | 2008-12-15 08:58:59 (GMT) |
commit | 2d2fe572a4605d3c25055717c1033589e2889e65 (patch) | |
tree | c5d67af0ba51c48f36bf7117539f26ea04b496fe /Lib/compiler/transformer.py | |
parent | cbc1ed5e2811d2ef7dbf243a1adbcf1c9bf6cba1 (diff) | |
download | cpython-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.py | 4 |
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): |