e.g. below set class variable and instance attribute the same name to show the difference and look up order:

  • the attribute look up order: when request an attribute to an instance, it looks for that attribute in the instance first then in the class.

e.g. below how to access class variable in instance: