Home > other >  Beginners wxPython, panel=wx. A panel (self) this sentence, why do you want to add a self parameters
Beginners wxPython, panel=wx. A panel (self) this sentence, why do you want to add a self parameters

Time:10-10

The import wx
The class Frame0 (wx. Frame) :
Def __init__ (self, superior) :
Wx. Frame. __init__ (self, parent=superior, title=u "is the first form", size=(300300))
the panel=wx. A panel (self) why do you want to add the self this parameter, do not add?

I am using 2.7.6 version

CodePudding user response:

The self is: the first parameter to the default class method and is a must, without complains

CodePudding user response:

The self is the object itself (instance), and of course to add
  • Related