From: Robert Klemme Date: 2008-10-21T15:03:44+09:00 Subject: Re: instance counter On 20.10.2008 23:20, Pit Capitain wrote: > 2008/10/20 Robert Klemme : >> Do you have an example which cannot be handled as easily by a class >> instance variable? I can't think of any ATM - which does not mean it >> does not exist. > > In one example I remember I had a class inheritance hierarchy and > needed to keep some information in the base class. I wanted to access > this information from the subclasses without having to know the exact > ancestor where the information was stored. The easiest way to do that > was using a class variable. > > Of course it would also be possible to use class instance variables > and accessor methods like Dave suggested, but I didn't want to write > "BaseClass.accessor_method". class Base class <