Re: property getter with more than 1 argument?

2008-07-18 Thread [EMAIL PROTECTED]
On 17 juil, 16:57, mk <[EMAIL PROTECTED]> wrote: > It seems like getter is defined in such way that it passes only 'self': > > class FunDict(dict): > def __init__(self): > self.fundict = dict() What's the use of inheriting from dict here ??? > def fget(self, fun):

Re: property getter with more than 1 argument?

2008-07-17 Thread Roy H. Han
I don't understand what you're trying to do here. On Thu, Jul 17, 2008 at 10:57 AM, mk <[EMAIL PROTECTED]> wrote: > > It seems like getter is defined in such way that it passes only 'self': > > > class FunDict(dict): >def __init__(self): >self.fundict = dict() > >d

property getter with more than 1 argument?

2008-07-17 Thread mk
It seems like getter is defined in such way that it passes only 'self': class FunDict(dict): def __init__(self): self.fundict = dict() def fget(self, fun): return fundict[fun.func_name] def fset(self, newfun): self.fundic