运行此代码会导致错误
import wx
class MyFrame(wx.Frame):
def __init__(self, *args, **kwargs):
wx.Frame.__init__(self, args, kwargs)
self.Show()
app = wx.App()
frame = MyFrame(None)
app.MainLoop()
Traceback (most recent call last):
File "testing.py", line 10, in <module>
frame = MyFrame(None)
File "testing.py", line 6, in __init__
wx.Frame.__init__(self, args, kwargs)
File "C:\Python27\lib\site-packages\wx-2.9.4-msw\wx\_windows.py", line 580, in __init__
_windows_.Frame_swiginit(self,_windows_.new_Frame(*args, **kwargs))
TypeError: in method 'new_Frame', expected argument 1 of type 'wxWindow *'
是否可以在 wxpython 中使用 *args 和 **kwargs 作为位置和命名参数?