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
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
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
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