2011/9/22 Zariko Taba <zariko.t...@gmail.com> > [translation:ERROR] ValueError: character code not in range(256) > > With this snippet of code : > > self.constants_dict[key] = 256 - len(constants) > > If len(constants) is 257, > then self.constants_dict[key] is -1 > and chr(-1) raise the ValueError. > > I attached a (really) stupid example to reproduce. > When I browse pypy sources in rpython, I can't believe there is less than > 256 constants of type 'ref'. > > What do you think ? Did I miss something ? >
There are many string constants in your function. Did you try something like raise Exception("Opcode not implemented : %d" % opcode) -- Amaury Forgeot d'Arc
_______________________________________________ pypy-dev mailing list pypy-dev@python.org http://mail.python.org/mailman/listinfo/pypy-dev