[Python-Dev] Re: [Python-checkins] CVS: python/dist/src/Lib getopt.py,1.7,1.8
Guido van Rossum
guido@CNRI.Reston.VA.US
Tue, 21 Dec 1999 18:49:09 -0500
> From: "Barry A. Warsaw" <bwarsaw@cnri.reston.va.us>
> >>>>> "Guido" == Guido van Rossum <guido@CNRI.Reston.VA.US> writes:
>
> Guido> The raise could easily enforce this, but it would break
> Guido> lots of existing code.
>
> Maybe not (I'm not sure). All the standard exceptions inherit from
> Exception, and of course there'd be nothing to enforce for existing
> user-defined string based exceptions. How pervasive are user-defined
> class based exceptions that don't inherit from Exception? (I don't
> know, and I haven't grepped, but I think we've been making that
> recommendation from day 1 of class-based standard exceptions, and I
> try to follow this recommendation in my own code).
Yes, but class-based user exceptions existed many Python versions
before class-based standard exceptions!
Two examples in the standard library: ConfigParser.py and xdrlib.py.
> All Hail, Python 2.0, our Savior and Redeemer! :)
Or, the perfect excuse for procrastination :)
(But yes, 2.0 will enforce this.)
--Guido van Rossum (home page: http://www.python.org/~guido/)