Re: module wide metaclass for new style classes

2006-12-17 Thread Daniel Nogradi
> > I used to have the following code to collect all (old style) class > > names defined in the current module to a list called reg: > > > > > > def meta( reg ): > > def _meta( name, bases, dictionary ): > > reg.append( name ) > > return _meta > > > > reg = [ ] > > __metaclass__ = m

Re: module wide metaclass for new style classes

2006-12-17 Thread Peter Otten
Daniel Nogradi wrote: > I used to have the following code to collect all (old style) class > names defined in the current module to a list called reg: > > > def meta( reg ): > def _meta( name, bases, dictionary ): > reg.append( name ) > return _meta > > reg = [ ] > __metaclass__

Re: module wide metaclass for new style classes

2006-12-16 Thread Gabriel Genellina
On 16 dic, 14:44, "Daniel Nogradi" <[EMAIL PROTECTED]> wrote: > I used to have the following code to collect all (old style) class > names defined in the current module to a list called reg: > > def meta( reg ): > def _meta( name, bases, dictionary ): > reg.append( name ) > return

module wide metaclass for new style classes

2006-12-16 Thread Daniel Nogradi
I used to have the following code to collect all (old style) class names defined in the current module to a list called reg: def meta( reg ): def _meta( name, bases, dictionary ): reg.append( name ) return _meta reg = [ ] __metaclass__ = meta( reg ) class c1: pass class c2: