class variable won't icrement!

Aahz aahz at pythoncraft.com
Thu Sep 12 16:49:19 CEST 2002


In article <alpner$bm$1 at wanadoo.fr>,
Eric Brunel  <eric.brunel at pragmadev.com> wrote:
>
>I always found that inheritance of class attributes to instance attributes 
>was really misleading, and I even think it would be better if it were 
>simply removed from Python. IMHO, it would far more conform to the 
>"explicit is better than implicit" rule that is one of the basis of Python.

If I think of it as "scope resolution" rather than "inheritance", I find
that it makes more sense.  It works exactly the same way as hiding a
global with a local.
-- 
Aahz (aahz at pythoncraft.com)           <*>         http://www.pythoncraft.com/

Project Vote Smart: http://www.vote-smart.org/



More information about the Python-list mailing list