Commit ccf06236 authored by Kevin Modzelewski's avatar Kevin Modzelewski

Merge pull request #906 from kmod/decorated_func_line

The line of a decorated function is the decorator
parents 780e3fa2 66d52025
Subproject commit 8eb292731c29b6083c67c3ed58789f5494fab6e4
Subproject commit 1f62a285c57da50c00249a704deac00dae3c247b
def wrapper(f):
return f
@wrapper
@wrapper
def foo():
pass
# Should print the line that the first "@wrapper" is on:
print foo.func_code.co_firstlineno
import inspect
print repr(inspect.getsource(foo))
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment