0

Variables declared inside init function of a class

Variables declared inside init function of a class can be used inside other functions of the same class But, Variables declared inside any other function of a class cannot be used inside other functions of the same class can u tell my why this happens?

26th Jan 2017, 4:14 PM
Arjun Katyal
Arjun Katyal - avatar
2 ответов
0
I got it sorted out. self was missing due to which I was not able to access that variable in other functions of same class. but, self was present in the init function.
26th Jan 2017, 4:39 PM
Arjun Katyal
Arjun Katyal - avatar