Author: Alex Gaynor <[email protected]>
Branch:
Changeset: r63110:a98535f8e486
Date: 2013-04-06 22:42 -0700
http://bitbucket.org/pypy/pypy/changeset/a98535f8e486/
Log: Convert somethign to use a new-style class, as well as make catching
an exception more precise.
diff --git a/rpython/flowspace/framestate.py b/rpython/flowspace/framestate.py
--- a/rpython/flowspace/framestate.py
+++ b/rpython/flowspace/framestate.py
@@ -2,7 +2,7 @@
from rpython.rlib.unroll import SpecTag
-class FrameState:
+class FrameState(object):
def __init__(self, mergeable, blocklist, next_instr):
self.mergeable = mergeable
self.blocklist = blocklist
@@ -63,6 +63,7 @@
class UnionError(Exception):
"The two states should be merged."
+
def union(w1, w2):
"Union of two variables or constants."
if w1 is None or w2 is None:
@@ -117,7 +118,7 @@
key = unroller.__class__, len(vars)
try:
tag = PICKLE_TAGS[key]
- except:
+ except KeyError:
tag = PICKLE_TAGS[key] = Constant(PickleTag())
UNPICKLE_TAGS[tag] = key
lst[i:i + 1] = [tag] + vars
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit