[Python-Dev] Exceptions *must*? be old-style classes?
Guido van Rossum
gvanrossum at gmail.com
Tue Feb 15 19:55:53 CET 2005
> My design decision was to make Exception new-style. Things can be
> raised if they are instances of old-style classes or instances of
> Exception. If this meets with general agreement, I'd like to check
> the above patch in.
I like it, but didn't you forget to mention that strings can still be
raised? I think we can't break that (but we can insert a deprecation
warning for this in 2.5 so we can hopefully deprecate it in 2.6, or
2.7 at the latest).
> The patch also updates the PendingDeprecationWarning on raising a
> string exception to a full DeprecationWarning (something that should
> be done anyway).
What I said. :-)
--Guido van Rossum (home page: http://www.python.org/~guido/)
More information about the Python-Dev