Re: Obtaining a callable class method object from a specific class

2008-04-10 Thread Nathan Duran
On Apr 10, 2008, at 1:25 PM, [EMAIL PROTECTED] wrote: > won't question why you want to do this... > Here is a solution base on a metaclass, but it feels wrong. > class MetaScore(type): >def __new__(meta, name, bases, attrs): >attrs.setdefault('score', score) >return type.__ne

Re: Obtaining a callable class method object from a specific class

2008-04-10 Thread Arnaud Delobelle
On Apr 10, 7:47 pm, Nathan Duran <[EMAIL PROTECTED]> wrote: > This is a contrived pseudocode example which has been broken out of a   > larger problem, so it may seem like a strange thing to want to do,   > but... > > I have a group of objects which inherit (single) from a common base   > class lik

Obtaining a callable class method object from a specific class

2008-04-10 Thread Nathan Duran
This is a contrived pseudocode example which has been broken out of a larger problem, so it may seem like a strange thing to want to do, but... I have a group of objects which inherit (single) from a common base class like so: --- class Root(object): @classmethod def CumulativeSco