class A(object):
def routine(self):
print "A.routine()"
class B(A):
def routine(self):
print "B.routine()"
A().routine()
def fun():
b = B()
b.routine()
if __name__ == '__main__':fun()
When I use the above code the A().routine executes the command in method of class A but when I use the code:
import wx
class Example(wx.Frame):
def __init__(self, parent, title):
wx.Frame().__init__(parent, title=title, size=(300, 200))
self.Centre()
self.Show()
if __name__ == '__main__':
app = wx.App()
Example(None, title='Size')
app.MainLoop()
why is it that
wx.Frame().__init__(parent, title=title, size=(300, 200))
does not work similar to
A().routine()
and instead shows the error: TypeError: Required argument 'parent' {pos 1} not found