def docstring_append(addendum, join=''):
    """
    Custom decorator that allows a given string `addendum` to be appended to
    the docstring of the target function/class, separated by a given string
    `join`.

    If `addendum` is not a string, its :attr:`~object.__doc__` attribute is
    used instead.

    """

    # If addendum is not a string , try to use its __doc__ attribute
    if not isinstance(addendum, str):
        addendum = addendum.__doc__

    # This function performs the docstring append on a given definition
    def do_append(target):
        # Perform append
        if target.__doc__:
            target.__doc__ = join.join([target.__doc__, addendum])
        else:
            target.__doc__ = addendum

        # Return the target definition
        return(target)

    # Return decorator function
    return(do_append)