Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(63)

Unified Diff: Lib/inspect.py

Issue 1764286: inspect.getsource does not work with decorated functions
Patch Set: Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | Lib/test/inspect_fodder2.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
--- a/Lib/inspect.py Sun Sep 29 01:49:07 2013 +0200
+++ b/Lib/inspect.py Sun Sep 29 12:44:49 2013 +0300
@@ -793,6 +793,7 @@
corresponding to the object and the line number indicates where in the
original source file the first line of code was found. An OSError is
raised if the source code cannot be retrieved."""
+ object = unwrap(object)
lines, lnum = findsource(object)
if ismodule(object): return lines, 0
« no previous file with comments | « no previous file | Lib/test/inspect_fodder2.py » ('j') | no next file with comments »

RSS Feeds Recent Issues | This issue
This is Rietveld 894c83f36cb7+