[Python-Dev] Exception Reorg PEP checked in
Guido van Rossum
gvanrossum at gmail.com
Thu Aug 4 17:23:32 CEST 2005
In general the PEP looks really good now!
On 8/4/05, Willem Broekema <metawilm at gmail.com> wrote:
> On 8/4/05, Brett Cannon <bcannon at gmail.com> wrote:
> > OK, once the cron job comes around and is run,
> > http://www.python.org/peps/pep-0348.html will not be a 404 but be the
> > latest version of the PEP.
>
> Currently, when the "recursion limit" is reached, a RuntimeError is
> raised. RuntimeError is in the PEP renamed to UserError. UserError is
> in the new hierarchy located below StandardError, below Exception.
>
> I think that in the new hierarchy this error should be in the same
> "critical" category as MemoryError. (MemoryError includes general
> stack overflow.)
No. Usually, a recursion error is a simple bug in the code, no
different from a TypeError or NameError etc.
This does contradict my earlier claim that Python itself doesn't use
RuntimeError; I think I'd be happier if it remained RuntimeError. (I
think there are a few more uses of it inside Python itself; I don't
think it's worth inventing new exceptions for all these.)
--
--Guido van Rossum (home page: http://www.python.org/~guido/)
More information about the Python-Dev
mailing list