A
Alexandru Moșoi
i'm facing the following problem:
class Base(object):
def __getattr__(self, attr): return lambda x: attr + '_' + x
def dec(callable):
return lambda *args: 'dec_' + callable(*args)
class Derived(Base):
what_so_ever = dec(Base.what_so_ever) # wrong, base doesn't have
what_so_ever
mumu = dec(Base.mumu) # wrong, base
doesn't have mumu
any idea how to do this?
class Base(object):
def __getattr__(self, attr): return lambda x: attr + '_' + x
def dec(callable):
return lambda *args: 'dec_' + callable(*args)
class Derived(Base):
what_so_ever = dec(Base.what_so_ever) # wrong, base doesn't have
what_so_ever
mumu = dec(Base.mumu) # wrong, base
doesn't have mumu
any idea how to do this?