The self
name is used as the instance reference in class instances. It is only used in class method definitions. Don't use it in functions.
You also cannot reference local variables from other functions or methods with it. You can only reference instance or class attributes using it.