[Python-Dev] PEP, take 2: Exception Reorganization for Python 3.0

Raymond Hettinger raymond.hettinger at verizon.net
Thu Aug 4 01:34:52 CEST 2005


> The problem with Raisable
> is that it doesn't contain the word exception; perhaps we can call it
> BaseException? 

+1



> A refinement might be to introduce something called Error, which would
> change the last part of the avove hierarchy as follows:
 . . .
> This has a nice symmetry between Error and Warning.
> 
> Downside is that this "breaks" all user code that currently tries to
> be correct by declaring exceptions as deriving from Exception, which
> is pretty common; they would have to derive from Error to be
> politically correct.
> 
> I don't immediately see what's best -- maybe Exception and Error
> should be two names for the same object??? But that's ugly too as a
> long-term solution.

-1 

Who really cares about the distinction?  Besides, the correct choice may
depend on your point of view or specific application (i.e. a case could
be made that NotImplementedError is sometimes just a regular exception
that can be expected to arise and be handled in the normal course of
business).  Unless we can point to real problems that people are having
today, then these kind of changes are likely unwarranted.


Raymond



More information about the Python-Dev mailing list