[Python-Dev] GeneratorExit inheriting from Exception

Greg Ewing greg.ewing at canterbury.ac.nz
Mon Mar 20 03:45:18 CET 2006


Giovanni Bajo wrote:

> OTOH, I also understand that people have been told that deriving from Exception
> is the right thing to do forever now.

Have we really being telling them to derive *directly*
from Exception, or just that deriving somehow from
Exception will become mandatory?

For the purpose of minimising bare-except problems,
recommending direct derivation from Exception seems
like a particularly bad idea, whether the exception
hierarchy is changed or not.

Greg


More information about the Python-Dev mailing list