[Python-Dev] GeneratorExit inheriting from Exception
Josiah Carlson
jcarlson at uci.edu
Tue Mar 21 09:38:01 CET 2006
Michael Chermside <mcherm at mcherm.com> wrote:
>
> Barry writes:
> > I still believe in this, and I'm thankful for the support I've seen. It
> > won't happen for Python 2.x, but I do plan on addressing this for Py3K.
>
> When you do, I'd like you to consider one change to the names. You are
> proposing this:
>
> > Exception
> > +- KeyboardInterrupt
> > +- GeneratorExit
> > +- SystemExit
> > +- StopIteration
> > +- Error
> > | +- ImportError
> > | +- (etc.)
> [...]
>
> If we use that structure, I still strongly feel that what you call "Error"
> ought to be named "Exception" (and what you call "Exception" should be
> named "BaseException" or perhaps "Raisable"). The reason is this:
[snip some good reasons]
+1 for those good reasons and others.
- Josiah
More information about the Python-Dev
mailing list