Commit 66d52025 authored by Kevin Modzelewski's avatar Kevin Modzelewski

The line of a decorated function is the decorator

This is the test for the fix in vinzenz/libpypa#49
parent 54a9559e
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