Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
P
Pyston
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Boxiang Sun
Pyston
Commits
ccf06236
Commit
ccf06236
authored
Sep 22, 2015
by
Kevin Modzelewski
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #906 from kmod/decorated_func_line
The line of a decorated function is the decorator
parents
780e3fa2
66d52025
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
1 deletion
+14
-1
build_deps/libpypa
build_deps/libpypa
+1
-1
test/tests/decorated_func_line.py
test/tests/decorated_func_line.py
+13
-0
No files found.
libpypa
@
1f62a285
Subproject commit
8eb292731c29b6083c67c3ed58789f5494fab6e4
Subproject commit
1f62a285c57da50c00249a704deac00dae3c247b
test/tests/decorated_func_line.py
0 → 100644
View file @
ccf06236
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
))
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment