what is self?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • paul h

    what is self?

    hi there,
    i've been programming cgi with python for a couple of months now, and
    i am now moving into some gui programming, using pygtk2.
    looking into the code, i see a lot of references to "self" ie
    self.window = ...
    however, i have no idea what self is?
    can anyone enlighten me...
    thanks very much...

    --
    paul
  • Bruno Desthuilliers

    #2
    Re: what is self?

    paul h wrote:[color=blue]
    > hi there,
    > i've been programming cgi with python for a couple of months now, and
    > i am now moving into some gui programming, using pygtk2.
    > looking into the code, i see a lot of references to "self" ie
    > self.window = ...
    > however, i have no idea what self is?
    > can anyone enlighten me...
    > thanks very much...
    >[/color]

    self is the current object (read : class instance). I think you should
    read the part about oop support in the python manual.

    Bruno

    Comment

    Working...