How can it be explained that inspect.getargvalues
returns keyword only args as args instead of varargs. Is this a bug or a documentation bug? Are keyword only args not keyword args? I don't understand.
inspect.getargvalues(frame)
Get information about arguments passed into a particular frame. A named tuple ArgInfo(args, varargs, keywords, locals) is returned. args is a list of the argument names. varargs and keywords are the names of the * and ** arguments or None. locals is the locals dictionary of the given frame.
import inspect
def fun(x, *, y):
print (inspect.getargvalues(inspect.currentframe()))
Output:
fun (10, y=20)
ArgInfo(args=['x', 'y'], varargs=None, keywords=None, locals={'y': 20, 'x': 10})