wxpython: how do i write this without the id parameter?
Frank Niessink
frank at niessink.com
Sat Jun 17 11:12:13 EDT 2006
Scott David Daniels:
> John Salerno wrote:
>> I was reading in the wxPython wiki that most of the time you don't have
>> to include the id parameter at all, and you can just use keyword
>> arguments for other parameters. But I'm having trouble converting this
>> code into that method (i.e., without the id parameter)....
>>
>> import wx
>>
>> class InputForm(wx.Frame):
>> def __init__(self, parent, id, title):
>> wx.Frame.__init__(self, parent, id, title)
I usually do it like this:
class InputForm(wx.Frame):
def __init__(self, *args, **kwargs):
super(InputForm, self).__init__(*args, **kwargs)
...
Cheers, Frank
More information about the Python-list
mailing list