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 Baz when the module is > loaded but I need to do something more : > > Before adding anything to these classes, > 1 - I need to parse all defined Foo classes > 2 - "sort" them > 3 - parse this sorted list to add attrs and methods. > > This seems to be really to clever for me ;-( > > Any idea ? Why do you want to do this? It is in that way not possible - python has no preprocessing step that would allow this. I suggest you explain to us what you are after here, and then we might come up with a solution. Diez -- http://mail.python.org/mailman/listinfo/python-list