Is there a way to get function parameter names, including bound-methods excluding `self`? <p>I can use <code>inspect.getargspec</code> to get the parameter names of any function, including bound methods:</p> <pre><code>&gt;&gt;&gt; import inspect &gt;&gt;&gt; class C(object): ... def f(self, a, b): ... pass ... &gt;&gt;&gt; c = C() &gt;&gt;&gt; inspect.getargspec(c.f) ArgSpec(args=['self', 'a', 'b'], varargs=None, keywords=None, defaults=None) &gt;&gt;&gt; </code></pre> <p>However, <code>getargspec</code> includes <code>self</code> in the argument list.</p> <p>Is there a universal way to get the parameter list of any function (and preferably, any callable at all), excluding <code>self</code> if it's a method?</p> <p>EDIT: Please note, I would like a solution which would on both Python 2 and 3.</p>