import functools


def partial(func, *args, **kwargs):
    """
    Return a partial function. Same as functools.partial but keeping the __doc__
    and __name__ of the warpper function.
    """
    return functools.update_wrapper(functools.partial(func, *args, **kwargs), func)