Exception.__init__ needed in derived class?
george young
gry at ll.mit.edu
Wed Apr 23 14:07:54 EDT 2003
[python-2.3a1]
Does class Exception have a constructor __init__ that needs
to be called? I couldn't find this in the docs. I see many
uses of inheriting from Exception without invoking
Exception.__init__(self), but nobody ever *said* that this
was safe to leave out...
Pychecker complains about this, which is what brought it to
mind. I can certainly invoke it just to make pychecker
happy, but I wondered...
--
I cannot think why the whole bed of the ocean is
not one solid mass of oysters, so prolific they seem. Ah,
I am wandering! Strange how the brain controls the brain!
-- Sherlock Holmes in "The Dying Detective"
More information about the Python-list
mailing list