[Python-Dev] GeneratorExit inheriting from Exception

Barry Warsaw barry at python.org
Mon Mar 20 16:43:30 CET 2006


On Sun, 2006-03-19 at 19:18 -0800, Guido van Rossum wrote:

> I have a problem with using Error as the focal point since so many
> exceptions (user-defined or otherwise) aren't errors. 

I'm not sure that's totally true in practice.  I think most user-defined
exceptions are actually errors.  Ideally, StandardError would be called
Error (or there'd be an alias of that name) and people should be
deriving their error exceptions from Error.  Their non-error exceptions
would be derived from Exception.

The last thing I'll suggest in this thread for Python 2.5 is to add an
alias called Error for StandardError.  Then, users can begin to do the
sensible thing (as above).

-Barry

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 309 bytes
Desc: This is a digitally signed message part
Url : http://mail.python.org/pipermail/python-dev/attachments/20060320/353e55fa/attachment.pgp 


More information about the Python-Dev mailing list