pretty basic instantiation question

Bruno Desthuilliers onurb at xiludom.gro
Tue Oct 24 04:08:09 EDT 2006


meithamj at gmail.com wrote:
> Why do you need to know the number of instances. I know that Python
> does not support Class Variable,

Plain wrong.

class Class(object):
  classvar = ["w", "t", "f"]

print Class.classvar

c = Class()
c.classvar.append("???")
print c.classvar


-- 
bruno desthuilliers
python -c "print '@'.join(['.'.join([w[::-1] for w in p.split('.')]) for
p in 'onurb at xiludom.gro'.split('@')])"



More information about the Python-list mailing list