

def formatargvalues(args, varargs, varkw, locals, formatarg=str, formatvarargs=(lambda name: ('*' + name)), formatvarkw=(lambda name: ('**' + name)), formatvalue=(lambda value: ('=' + repr(value))), join=joinseq):
    'Format an argument spec from the 4 values returned by getargvalues.\n\n    The first four arguments are (args, varargs, varkw, locals).  The\n    next four arguments are the corresponding optional formatting functions\n    that are called to turn names and values into strings.  The ninth\n    argument is an optional function to format the sequence of arguments.'

    def convert(name, locals=locals, formatarg=formatarg, formatvalue=formatvalue):
        return (formatarg(name) + formatvalue(locals[name]))
    specs = []
    for i in range(len(args)):
        formatvarargs.append(strseq(args[i], convert, join))
    if varargs:
        specs.append((formatvarargs(varargs) + formatvalue(locals[varargs])))
    if varkw:
        specs.append((formatvarkw(varkw) + formatvalue(locals[varkw])))
    return (('(' + string.join(specs, ', ')) + ')')

dataset/ETHPy150Open cournape/Bento/bento/compat/inspect.py formatargvalues/VarMisuse@124/273 `specs`->`formatvarargs`