what is self?

Discussion in 'Python' started by paul h, Jul 2, 2003.

  1. paul h

    paul h Guest

    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
    paul h, Jul 2, 2003
    #1
    1. Advertising

  2. paul h wrote:
    > 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...
    >


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

    Bruno
    Bruno Desthuilliers, Jul 2, 2003
    #2
    1. Advertising

  3. paul h

    Ben Finney Guest

    On 2 Jul 2003 09:46:32 -0700, paul h wrote:
    > however, i have no idea what self is?


    You haven't read through the tutorial then.

    Please do so now, it will fill in many missing pieces of knowledge you
    currently have about Python:

    <http://python.org/doc/current/tut/>

    --
    \ "Either he's dead or my watch has stopped." -- Groucho Marx |
    `\ |
    _o__) |
    http://bignose.squidly.org/ 9CFE12B0 791A4267 887F520C B7AC2E51 BD41714B
    Ben Finney, Jul 3, 2003
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Ralf W. Grosse-Kunstleve
    Replies:
    16
    Views:
    552
    Lonnie Princehouse
    Jul 11, 2005
  2. Ralf W. Grosse-Kunstleve
    Replies:
    18
    Views:
    570
    Bengt Richter
    Jul 11, 2005
  3. Ralf W. Grosse-Kunstleve
    Replies:
    2
    Views:
    383
    Dan Sommers
    Jul 12, 2005
  4. falcon
    Replies:
    0
    Views:
    353
    falcon
    Jul 31, 2005
  5. Bart Kastermans
    Replies:
    6
    Views:
    377
    Bart Kastermans
    Jul 13, 2008
Loading...

Share This Page