How to get line number of function (with/without a decorator) in a python module?
<p>I want to get the line number of a python function in the source code. 
What i have in runtime is module, class, method objects</p>

<p>Had a look at inspect</p>

<pre><code>inspect.getsourcelines(object)    
</code></pre>

<p>which also gives line number in result. </p>

<p>I see that for methods with decorators, line no. returned from above inspect function points to the actual decorator's source code rather than desired function's source code. 
So any way to workaround this?
(i understand that interpreter does something like wrapping function inside decorator in runtime, but i might be wrong)</p>
