1.1 --- a/simplify.py Sun Dec 03 23:47:41 2006 +0100
1.2 +++ b/simplify.py Wed Dec 06 00:48:29 2006 +0100
1.3 @@ -582,9 +582,10 @@
1.4 return result
1.5
1.6 def visitConst(self, const):
1.7 - if not self.constants.has_key(const.value):
1.8 - self.constants[const.value] = Constant(name=repr(const.value), value=const.value)
1.9 - result = LoadRef(const, 1, ref=self.constants[const.value])
1.10 + key = "%s-%s" % (const.value.__class__.__name__, const.value)
1.11 + if not self.constants.has_key(key):
1.12 + self.constants[key] = Constant(name=repr(const.value), value=const.value)
1.13 + result = LoadRef(const, 1, ref=self.constants[key])
1.14 return result
1.15
1.16 def visitContinue(self, continue_):