def dictdoc(method):
 dict_method = getattr(dict, method.__name__)
 if hasattr(dict_method, '__doc__'):
  method.__doc__ = dict_method.__doc__
 return method

def dictdoc ( method ) : dict_method = getattr ( dict , method . __name__ ) if hasattr ( dict_method , '__doc__' ) : method . __doc__ = dict_method . __doc__ return method
a decorator making reuse of the ordinary dicts docstrings more concise .