preserve argspec when decorating?
<blockquote>
  <p><strong>Possible Duplicate:</strong><br>
  <a href="http://stackoverflow.com/questions/3729378/how-can-i-programmatically-change-the-argspec-of-a-function-in-a-python-decorato">How can I programmatically change the argspec of a function in a python decorator?</a>  </p>
</blockquote>



<p>argspec is a great way to get arguments of a function, but it doesn't work when the function has been decorated:</p>

<pre><code>def dec(func):
    @wraps(func)
    def wrapper(*a, **k)
        return func()
    return wrapper


@dec
def f(arg1, arg2, arg3=SOME_VALUE):
    return

import inspect
print inspect.argspec(f)

-----------

ArgSpec(args=[], varargs='a', keywords='k', defaults=None)
</code></pre>

<p>Argspec should return <code>arg1</code>, <code>arg2</code>, <code>arg3</code>. I think I need to define <code>wrapper</code> differently as to not use <code>*a</code> and <code>**k</code>, but I don't know how.</p>
