(fn)
return tuple(args), keywords
Returns:
        tuple: Returns a (arguments, kwarg_name)-tuple:
             - the arguments (positional or keyword)
             - the name of the ** kwarg catch all.

    The self-argument for methods is always removed.
Returns:
        tuple: Returns a (arguments, kwarg_name)-tuple:
             - the arguments (positional or keyword)
             - the name of the ** kwarg catch all.
Returns : tuple : Returns a ( arguments kwarg_name ) - tuple : - the arguments ( positional or keyword ) - the name of the ** kwarg catch all .
def signature(fn):
    """
    Returns:
        tuple: Returns a (arguments, kwarg_name)-tuple:
             - the arguments (positional or keyword)
             - the name of the ** kwarg catch all.

    The self-argument for methods is always removed.
    """

    signature = inspect.signature(fn)

    args = []
    keywords = None
    for arg in signature.parameters.values():
        if arg.kind == arg.VAR_KEYWORD:
            keywords = arg.name
        elif arg.kind == arg.VAR_POSITIONAL:
            continue  # skip *args catch-all
        else:
            args.append(arg.name)

    return tuple(args), keywords
def signature ( fn ) : signature = inspect . signature ( fn ) args = [ ] keywords = None for arg in signature . parameters . values ( ) : if arg . kind == arg . VAR_KEYWORD : keywords = arg . name elif arg . kind == arg . VAR_POSITIONAL : continue # skip *args catch-all else : args . append ( arg . name ) return tuple ( args ) , keywords