I've researched for hours and have not found a decent explanation of 'self', and it's popping up in every tutorial / python video I watch.. Please explain it as if you were explaining it to an idiot, heres an example code, I do not understand why you would use 'self', what does it do that's useful? I would like to say I know quite a bit of python, but I can't figure out this 'self', explanations appreciated! :)
class className:
def createName(self, name):
self.name = name #Whats this 'self' referring to?
def sayName(self):
print 'hello %s' % self.name
testing=className()
testing.createName('test')
testing.sayName()