[IronPython] Initialisation of .NET Subclasses
Michael Foord
fuzzyman at voidspace.org.uk
Thu Mar 15 00:25:47 CET 2007
Hello all,
I'm wondering about best practise when subclassing Windows Forms
controls. I have a vague memory of hearing that initialisation is done
in the '__new__' methods of .NET controls, so that '__init__' overrides
*need not* call up to their base class. Is this correct, or was I
hallucinating ?
In other words, is the following ok :
class MainForm(Form):
def __init__(self):
pass
Or should I be doing :
class MainForm(Form):
def __init__(self):
Form.__init__(self)
?
All the best,
Michael Foord
http://www.voidspace.org.uk/ironpython/
More information about the Ironpython-users
mailing list