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