def _inherit_doc(cls):
 def func(fn):
  fn.__doc__ = cls.__dict__[fn.__name__].__doc__
  return fn
 return func

def _inherit_doc ( cls ) : def func ( fn ) : fn . __doc__ = cls . __dict__ [ fn . __name__ ] . __doc__ return fn return func
decorator for inheriting docstrings from base classes .