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?
--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to