Re: metaclass : parse all class once before doing anything else ?

2006-07-30 Thread gene tani
Paddy wrote: Laurent Rahuel wrote: Laurent. I, like Diez am unsure of why you would need what you have asked for, but maybe this will help. You can keep track of all instances of a class by this kind of thing: class C1(object): ... inst = [] ... def __init__(self): ...

Re: metaclass : parse all class once before doing anything else ?

2006-07-29 Thread Diez B. Roggisch
Laurent Rahuel schrieb: I got a metaclass named Foo I have the impression that you are not talking about a meta-class, but a normal class here. Then I got two others classes: class Bar(Foo): pass class Baz(Foo): pass I know how to add some attrs, methods to Bar and

Re: metaclass : parse all class once before doing anything else ?

2006-07-29 Thread Paddy
Laurent Rahuel wrote: Hi, I have a much to smart problem for my brain. Here is the deal : I got a metaclass named Foo Then I got two others classes: class Bar(Foo): pass class Baz(Foo): pass I know how to add some attrs, methods to Bar and Baz when the module is

metaclass : parse all class once before doing anything else ?

2006-07-28 Thread Laurent Rahuel
Hi, I have a much to smart problem for my brain. Here is the deal : I got a metaclass named Foo Then I got two others classes: class Bar(Foo): pass class Baz(Foo): pass I know how to add some attrs, methods to Bar and Baz when the module is loaded but I need to do something