[Zope] self()....what is it?

Aruna Prabhakaran aruna_prabhakaran@hotmail.com
Wed, 07 Nov 2001 13:49:11 +0000


hi,
I am just not able to get the concept of the "self" in python.I came across 
the source code for the pop method of a stack on the python website.but it's 
just passing over and above my head:(((Can somebody explain to me why and 
how it is used?(reminds me of the 'void' of good old C:)
Also looks like self is being treated as list/tuple here why?
-----------------------------------------------------
def pop(self):
	if len(self):
	    res =  self[-1]
	    del self[-1]
	    return res
	else:
	    raise IndexError, "Stack %s is empty"%self.name()

thanks in advance.
with regards from A Thoroughly Confused me:(((


Aruna Prabhakaran
ZeOmega Infotech Pvt Ltd
Bangalore
India.


_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp