what is self?

Bruno Desthuilliers bdesth.nospam at removeme.free.fr
Wed Jul 2 21:27:08 CEST 2003


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





More information about the Python-list mailing list