Thursday, October 29, 2015

self in python class

self:
1. self is just a very powerful convention and it's not really a reserved keyword in Python. Java and C# have this as a keyword
2. "self" is same as "this" in java and C#
3. "self" is reference to a generic, anonymous, or un-named instance of the class inside which it is used.
4. python has more use of an instance reference for the class in the class structure than Java and C#.
5. "self" description is very confusing on the internet articles: "self" is simple thing - this is the way python class is structured - self is just a reference to an instance of the same class where it is getting used.   

1 comment:

  1. It's a stunning conversation. You lightened my mind. I also suggest that businesses like me include hiring a version of the java spring framework. Now, I realise it can optimise the proceedings of the projects. I hired one of the developers having exercised in the java spring framework. I am grateful to them, which made me customise my projects and formulate the right approach to amplify my operations.

    ReplyDelete