def recursion_args(func, func_locals, **kwargs):
    """returns named positional args only - without original *args, **kwargs"""
    co=func.func_code
    return tuple([ kwargs.pop(co.co_varnames[i], func_locals[co.co_varnames[i]])
                   for i in range(co.co_argcount) ])
    assert not kwargs
returns named positional args only - without original *args, **kwargs
recipes/Python/491265_Automatic_Recursion/recipe-491265.py