Python: what does self.control in a subclass of wx.Frame mean?
I am following the Getting started with wxPython tutorial, to this part. What is control
in the following line? I have searched in the Frame
class reference and googled for a 开发者_如何学Cwhile but still no clue.
self.control = wx.TextCtrl(self, style=wx.TE_MULTILINE)
Just in case next time I need information like this, where should I look?
Thanks,
Never mind, I found it from The Python Language Reference
To create instance variables, they can be set in a method with
self.name = value
So, control is just an instance variable, no more no less.
精彩评论