[Python-Dev] Pre-PEP: Exception Reorganization for Python 3.0 (original) (raw)

Brett Cannon bcannon at gmail.com
Sun Jul 31 18:15:15 CEST 2005


On 7/30/05, Fred L. Drake, Jr. <fdrake at acm.org> wrote:

On Saturday 30 July 2005 22:20, Brett Cannon wrote: > True, but the hierarchy should still properly reflect increasing > severity in my opinion. I am going to push for this; we will see if I > get pushed back enough to not do it.

I have no idea what you mean by "properly reflect increasing severity". Should the more severe or less severe case be derived from the other? I doubt there is a single answer that we can readily agree on. If DeprecationWarning and PendingDeprecationWarning need a class-hierarchy relationship (and I think they do; it is reasonable for someone to deal with them generically if they can reasonably want to deal with either), then it seems they need a common base: +--AnyDeprecationWarning +--DeprecationWarning +--PendingDeprecationWarning

I can compromise and go with a common base class that both directly inherit from.

-Brett



More information about the Python-Dev mailing list