[Python-3000] Generic function PEP won't make it in time

Greg Ewing greg.ewing at canterbury.ac.nz
Wed Apr 25 04:58:38 CEST 2007


Guido van Rossum wrote:
> So if we had this feature I'd make
> BaseException, Exception, StandardError, EnvironmentError and Warning
> abstract (or at least the first 2-3 of those).

I'm not sure I follow the reasoning here.

I've just written some code which raises EnvironmentError
in numerous places. This works perfectly well for the
application at hand, because I don't need to distinguish
between them any more finely. If I need to do so later,
I'll have to make some changes -- but that would happen
anyway even if I had created a subclass of EnvironmentError
such as MyEnvironmentError at the outset.

For library code, it's probably advisable not to use the
standard exception classes directly -- but I don't think
that guideline applies to *all* code.

--
Greg


More information about the Python-3000 mailing list