

def getargspec(func):
    "Get the names and default values of a function's arguments.\n\n    A tuple of four things is returned: (args, varargs, varkw, defaults).\n    'args' is a list of the argument names (it may contain nested lists).\n    'varargs' and 'varkw' are the names of the * and ** arguments or None.\n    'defaults' is an n-tuple of the default values of the last n arguments.\n    "
    if ismethod(func):
        func = func.im_func
    if (not isfunction(func)):
        raise TypeError('arg is not a Python function')
    (args, varargs, varkw) = getargs(func.func_code)
    return (args, varargs, varkw, func.func_defaults)

dataset/ETHPy150Open cournape/Bento/bento/compat/inspect.py getargspec/original