[Python-Dev] Re: [Python-checkins] CVS: python/dist/src/Lib getopt.py,1.7,1.8

Barry A. Warsaw bwarsaw@python.org
Tue, 21 Dec 1999 18:43:59 -0500 (EST)


>>>>> "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).

    Guido> I wish I had done it right from the start -- then
    Guido> exceptions would have been classes from the start and would
    Guido> have required inheritance from the Exception base class.
    Guido> Like in Java.  (And in C++?)

All Hail, Python 2.0, our Savior and Redeemer! :)

-Barry