Kent and Paul, Thanks very much for your help!
On Mon, May 19, 2008 at 8:43 AM, Paul McGuire <[EMAIL PROTECTED]> wrote: > >>>>>>>>>>>>>>>>>>>>>>>>>>>>>> > Hi - I wrote a custom exception class as follows: > > class CustomError(Exception): > def __init__(self, msg): > super(CustomError, self).__init__(self, msg) > > But this doesn't work as expected: > >>>>>>>>>>>>>>>>>>>>>>>>>>>>>> > > Correct use of super would be: > > class CustomError(Exception): > def __init__(self, msg): > super(CustomError, self).__init__(msg) > > (Don't add self as an argument.) > > Exception became a new-style class in Python 2.5. > > -- Paul > > _______________________________________________ > Tutor maillist - Tutor@python.org > http://mail.python.org/mailman/listinfo/tutor >
_______________________________________________ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor