What exactly does self do?


Can anyone explain this as simply as possible?


self is used to set an instance/class method


self is a local representation of the instance object, scoped to the execution context. Which ever instance is calling a method or accessing a property, that instance is locally referred to by self. This is how many instances can use the one class template.


This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.