Re: Access to static members from inside a method decorator?

2006-10-05 Thread glen . coates . bigworld
Bruno Desthuilliers wrote: > [EMAIL PROTECTED] wrote: > > I'm developing a library at the moment that involves many classes, some > > of which have "exposed" capabilities. I'm trying to design a nice > > interface for both exposing those capabilities, and inspecting > > instances to find out what

Re: Access to static members from inside a method decorator?

2006-10-05 Thread glen . coates . bigworld
Thanks for all the help guys ... in almost every way using a metaclass seems to be the right solution for what I'm trying to do here. I say almost because there is one thing that is still confusing me: what is the most elegant way to provide base-class implementations of methods that are expected

Re: Access to static members from inside a method decorator?

2006-10-08 Thread glen . coates . bigworld
Peter Otten wrote: > [EMAIL PROTECTED] wrote: > > You define one base type with a custom metaclass and inherit from that. Your > example then becomes: > > import sys > > class ExposedType( type ): > def __init__( cls, *args, **kw ): > # Track marked exposed methods > cls.s_expos

Access to static members from inside a method decorator?

2006-10-04 Thread glen . coates . bigworld
I'm developing a library at the moment that involves many classes, some of which have "exposed" capabilities. I'm trying to design a nice interface for both exposing those capabilities, and inspecting instances to find out what capabilities they have. At the moment, I'm leaning towards a supercla