I thought __new__ was called upon construction of the _class_ object that "Meta" is the type of. Then it would be available at the time of the definition of my class. Or am I mistaken?
Ole 2005/8/4, Christopher Subich <[EMAIL PROTECTED]>: > Jan-Ole Esleben wrote: > > class Meta(type): > > def __new__(cls, name, bases, d): > > d['classvar'] = [] > > return type.__new__(cls, name, bases, d) > > The problem is that __new__ is called upon object construction, not > class definition, but you're trying to set the class variables at > definition-time. > -- > http://mail.python.org/mailman/listinfo/python-list > -- http://mail.python.org/mailman/listinfo/python-list