Given the Pythonthat a function: a_method has been defined like
def a_method(arg1, arg2):
pass
How can I extract the number and names of the arguments. I.e., given that I have a reference toStarting from funca_method itself, how can I wantget the func.[something] to returnargument names ("arg1", "arg2").
The usage scenario- for this is that I have a decoratorexample, and I wish to use the method arguments in the same order that they appear for the actual function as a key. I.e.tuple of strings, how would the decorator look that printed "a,b" when I calllike a_method("a""arg1", "b""arg2")?