[Python-Dev] GeneratorExit inheriting from Exception

Barry Warsaw barry at python.org
Sat Mar 18 16:51:44 CET 2006

On Sat, 2006-03-18 at 16:50 +0100, Samuele Pedroni wrote:

> > I don't know whether this is possible for Python 2.5, 
> well, one thing to consider is all the
> class MyException(Exception):
> in current code.

Yep, which is why I'm not sure we can do this for Py2.5.  However as PEP
352 talks about a transition plan for Py3k, I think we should document
the ultimate desired hierarchy (and maybe implement that in the p3yk
branch ;), and then think about how to transition to it in Py2.5.

One possible approach is to revert BaseException out of Py2.5,
re-position KeyboardInterrupt, and add Error as an alias for
StandardError.  Then we can encourage people to start using Error as the
base classes for their own errors.


-------------- 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/20060318/cc54f9ea/attachment.pgp 

More information about the Python-Dev mailing list