def get_func_posargs_name ( f ) : sigparams = inspect . signature ( f ) . parameters for p in sigparams : if sigparams [ p ] . kind == inspect . Parameter . VAR_POSITIONAL : return sigparams [ p ] . name return None
how to see call signature of a funciton in python
Returns the name of the function f s keyword argument parameter if it exists otherwise None
def get_func_posargs_name(f):
    """Returns the name of the function f's keyword argument parameter if it exists, otherwise None"""
    sigparams = inspect.signature(f).parameters
    for p in sigparams:
        if sigparams[p].kind == inspect.Parameter.VAR_POSITIONAL:
            return sigparams[p].name
    return None