diff options
Diffstat (limited to 'Lib/compiler/pyassem.py')
-rw-r--r-- | Lib/compiler/pyassem.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Lib/compiler/pyassem.py b/Lib/compiler/pyassem.py index 82ff396..95f5c3e 100644 --- a/Lib/compiler/pyassem.py +++ b/Lib/compiler/pyassem.py @@ -210,7 +210,7 @@ def dfs_postorder(b, seen): order = [] seen[b] = b for c in b.get_children(): - if seen.has_key(c): + if c in seen: continue order = order + dfs_postorder(c, seen) order.append(b) @@ -406,7 +406,7 @@ class PyFlowGraph(FlowGraph): seen = {} def max_depth(b, d): - if seen.has_key(b): + if b in seen: return d seen[b] = 1 d = d + depth[b] @@ -482,7 +482,7 @@ class PyFlowGraph(FlowGraph): for name in self.cellvars: cells[name] = 1 self.cellvars = [name for name in self.varnames - if cells.has_key(name)] + if name in cells] for name in self.cellvars: del cells[name] self.cellvars = self.cellvars + cells.keys() |