(func)
return ArgSpec(args, varargs, varkw, func.func_defaults)
Get the names and default values of a function's arguments.

    A tuple of four things is returned: (args, varargs, varkw, defaults).
    'args' is a list of the argument names (it may contain nested lists).
    'varargs' and 'varkw' are the names of the * and ** arguments or None.
    'defaults' is an n-tuple of the default values of the last n arguments.
Get the names and default values of a function's arguments.
Get the names and default values of a function s arguments .
def getargspec(func):
    """Get the names and default values of a function's arguments.

    A tuple of four things is returned: (args, varargs, varkw, defaults).
    'args' is a list of the argument names (it may contain nested lists).
    'varargs' and 'varkw' are the names of the * and ** arguments or None.
    'defaults' is an n-tuple of the default values of the last n arguments.
    """

    if ismethod(func):
        func = func.im_func
    if not isfunction(func):
        raise TypeError('{!r} is not a Python function'.format(func))
    args, varargs, varkw = getargs(func.func_code)
    return ArgSpec(args, varargs, varkw, func.func_defaults)
def getargspec ( func ) : if ismethod ( func ) : func = func . im_func if not isfunction ( func ) : raise TypeError ( '{!r} is not a Python function' . format ( func ) ) args , varargs , varkw = getargs ( func . func_code ) return ArgSpec ( args , varargs , varkw , func . func_defaults )