R: [Python-Dev] Deprecating string exceptions

Guido van Rossum guido@python.org
Sat, 30 Mar 2002 13:39:58 -0500


> There are several problems in the std library now:
> 
> 	bdb.py:9	BdbQuit is a string exception
> 	macpath.py:173	norm_error is a string exception
> 	tabnanny.py:48	NannyNag does not derive from Exception
> 	xdrlib.py:12	ConversionError (Error) does not derive from Exception
> 
> Shall I make all of these derive from Exception?  

Please do.  Note that the last two line numbers are off w.r.t. current
CVS (the exception class is defined a few lines down) -- not sure if
that's a lurking PyChecker bug or that you used an older version.

> Is there any potential problems with doing so?

I don't think so.

--Guido van Rossum (home page: http://www.python.org/~guido/)