def repr_args(args, kwargs):
    """Stringify a set of arguments.

    Arguments:
        args: tuple of arguments as a function would see it.
        kwargs: dictionary of keyword arguments as a function would see it.
    Returns:
        String as you would write it in a script.
    """
    args_s = (("%s, " if kwargs else "%s") % ", ".join(map(repr, args))) if args else ""
    kws = ", ".join(map(lambda it: "%s=%r" % (it[0], it[1]), kwargs.items()))
    return "%s%s" % (args_s, kws)
dataset/ETHPy150Open kdart/pycopia/QA/pycopia/QA/core.py/repr_args/original