parameters: (cls, delegate, accessors, typ,
                                  overwrite=False)
docstring: Add accessors to cls from the delegate class.
  
          Parameters
          ----------
          cls : the class to add the methods/properties to
          delegate : the class to get methods/properties & doc-strings
          acccessors : string list of accessors to add
          typ : 'property' or 'method'
          overwrite : boolean, default False
             overwrite the method/property in the target class if it exists
docstring_summary: Add accessors to cls from the delegate class.
docstring_tokens: Add accessors to cls from the delegate class .
function: def _add_delegate_accessors(cls, delegate, accessors, typ,
                                  overwrite=False):
          """
          Add accessors to cls from the delegate class.
  
          Parameters
          ----------
          cls : the class to add the methods/properties to
          delegate : the class to get methods/properties & doc-strings
          acccessors : string list of accessors to add
          typ : 'property' or 'method'
          overwrite : boolean, default False
             overwrite the method/property in the target class if it exists
          """
  
          def _create_delegator_property(name):
  
              def _getter(self):
                  return self._delegate_property_get(name)
  
              def _setter(self, new_values):
                  return self._delegate_property_set(name, new_values)
  
              _getter.__name__ = name
              _setter.__name__ = name
  
              return property(fget=_getter, fset=_setter,
                              doc=getattr(delegate, name).__doc__)
  
          def _create_delegator_method(name):
  
              def f(self, *args, **kwargs):
                  return self._delegate_method(name, *args, **kwargs)
  
              f.__name__ = name
              f.__doc__ = getattr(delegate, name).__doc__
  
              return f
  
          for name in accessors:
  
              if typ == 'property':
                  f = _create_delegator_property(name)
              else:
                  f = _create_delegator_method(name)
  
              # don't overwrite existing methods/properties
              if overwrite or not hasattr(cls, name):
                  setattr(cls, name, f)
function_tokens: def _add_delegate_accessors ( cls , delegate , accessors , typ , overwrite = False ) : def _create_delegator_property ( name ) : def _getter ( self ) : return self . _delegate_property_get ( name ) def _setter ( self , new_values ) : return self . _delegate_property_set ( name , new_values ) _getter . __name__ = name _setter . __name__ = name return property ( fget = _getter , fset = _setter , doc = getattr ( delegate , name ) . __doc__ ) def _create_delegator_method ( name ) : def f ( self , * args , * * kwargs ) : return self . _delegate_method ( name , * args , * * kwargs ) f . __name__ = name f . __doc__ = getattr ( delegate , name ) . __doc__ return f for name in accessors : if typ == 'property' : f = _create_delegator_property ( name ) else : f = _create_delegator_method ( name ) # don't overwrite existing methods/properties if overwrite or not hasattr ( cls , name ) : setattr ( cls , name , f )