The object’s instance variables can be accessed by qualifying their name with the instance itself. Local variables can be created inside the method; these are accessed without qualification. Class variables (sometimes called static variables) can be accessed by qualifying their name with the class name, and global variables, that is, module variables, are accessed without qualification.
- 6. Object-Oriented Programming
- from Programming in Python 3: A Complete Introduction to the Python Language, Second Edition
- Publisher: Addison-Wesley Professional
- Released: November 2009
Local variable call inside a method = No Qualifier
Instance variable call inside a method = use "self.variable name"
Class variable call inside a method = use "class name.variable name"
global variable call inside a method = No Qualifier
Share this highlighthttp://www.safaribooksonline.com/a/programming-in-python/13211069/