[pypy-dev] Re: deep breakage
Armin Rigo
arigo at tunes.org
Mon Jun 9 16:30:13 MEST 2003
Hello Guido,
On Mon, Jun 09, 2003 at 09:54:30AM -0400, Guido van Rossum wrote:
> > This is the same problem as in CPython. Most failing internal
> > operations call PyErr_SetString(), which causes a string to be used
> > as the exception value.
>
> No, as the argument to the exception constructor.
Well, it is used as the exception value internally (stored in exc_value) until
some other part of code that actually wants to show the exception to Python
code normalizes it. This is what I was proposing to remove (and let our
equivalent of PyErr_SetString() immediately build the exception instance). I'm
not too concerned about building a StopIteration instance too much right now.
We could even have a single pre-built instance of it for performance purposes
(later).
> I would not even bother. String exceptions are strongly deprecated
> part of the language.
Ok. I tend to write occasionally 'raise "this-should-not-happend!"', but never
'raise X, Y' where X is a string. If it's not just me, I guess that this
limited backwards support could be quite easily hacked in by having 'raise
String' default to 'raise Exception, String', then.
A bientôt,
Armin.
More information about the pypy-dev
mailing list