summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNeal Norwitz <nnorwitz@gmail.com>2005-11-25 03:19:29 (GMT)
committerNeal Norwitz <nnorwitz@gmail.com>2005-11-25 03:19:29 (GMT)
commit212a5752424631438ae2a8a6ba3d4af22a1c4dd7 (patch)
tree739c5cf66ecf7ab4227b573420da6ce89ec85f7c
parentef260c080336265fd6a08b13500a526758ebe389 (diff)
downloadcpython-212a5752424631438ae2a8a6ba3d4af22a1c4dd7.zip
cpython-212a5752424631438ae2a8a6ba3d4af22a1c4dd7.tar.gz
cpython-212a5752424631438ae2a8a6ba3d4af22a1c4dd7.tar.bz2
Remove unused _callers member. No need for types, use isinstance
-rw-r--r--Lib/compiler/transformer.py7
1 files changed, 2 insertions, 5 deletions
diff --git a/Lib/compiler/transformer.py b/Lib/compiler/transformer.py
index 4759280..924dcc7 100644
--- a/Lib/compiler/transformer.py
+++ b/Lib/compiler/transformer.py
@@ -762,8 +762,6 @@ class Transformer:
def lookup_node(self, node):
return self._dispatch[node[0]]
- _callers = {}
-
def com_node(self, node):
# Note: compile.c has handling in com_node for del_stmt, pass_stmt,
# break_stmt, stmt, small_stmt, flow_stmt, simple_stmt,
@@ -1427,7 +1425,6 @@ _assign_types = [
symbol.factor,
]
-import types
_names = {}
for k, v in symbol.sym_name.items():
_names[k] = v
@@ -1437,9 +1434,9 @@ for k, v in token.tok_name.items():
def debug_tree(tree):
l = []
for elt in tree:
- if type(elt) == types.IntType:
+ if isinstance(elt, int):
l.append(_names.get(elt, elt))
- elif type(elt) == types.StringType:
+ elif isinstance(elt, str):
l.append(elt)
else:
l.append(debug_tree(elt))