Re: Metaclasses are not called in subclasses. What did I wrong?

2006-10-29 Thread Georg Brandl
Létező wrote: > I use Python 2.4.4. Please read the code below: > > --- > from new import classobj > > def mymeta(name,bases,clsdict): > print 'meta: %s'%name > return classobj(name,bases,clsdict) > > class A(object): > __metacl

Re: Metaclasses are not called in subclasses. What did I wrong?

2006-10-29 Thread Peter Otten
Létez? wrote: > I use Python 2.4.4. Please read the code below: > > --- > from new import classobj > > def mymeta(name,bases,clsdict): > print 'meta: %s'%name > return classobj(name,bases,clsdict) mymeta is not a class. > class A

Metaclasses are not called in subclasses. What did I wrong?

2006-10-28 Thread Létező
I use Python 2.4.4. Please read the code below: --- from new import classobj def mymeta(name,bases,clsdict): print 'meta: %s'%name return classobj(name,bases,clsdict) class A(object): __metaclass__=mymeta class B(A): pass

Metaclasses are not called in subclasses. What did I wrong?

2006-10-28 Thread Létező
I use Python 2.4.4. Please read the code below: --- from new import classobj def mymeta(name,bases,clsdict): print 'meta: %s'%name return classobj(name,bases,clsdict) class A(object): __metaclass__=mymeta class B(A): pass