<div dir="ltr">I&#39;m writing a decorator that needs to identify whether the function it&#39;s wrapping contains specific variables and if so, what value was passed to them.<div><br></div><div>For example if the function is foo(x,y) and it&#39;s called with foo(1,2) I want to have this information - {&#39;x&#39; : 1, &#39;y&#39; : 2}</div>
<div>My problem is that the caller can mix between positional and keyword arguments.</div><div><br></div><div>If I write my decorator as accepting *a,**kw I can probably use inspect.getargspec to figure out all the information like I want it.</div>
<div>However, it seems that this is something the language already does, so I wanted to know if I can get some access to the mechanism in python or specifically in IPy, so I don&#39;t have to write it again...</div><div><br>
</div><div>Any tips would be greatly appreciated</div><div><br></div><div>thanks</div><div>Ronnie</div><div><br></div></div>