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

Delta Between Two Patch Sets: Lib/test/inspect_fodder2.py

Issue 1764286: inspect.getsource does not work with decorated functions
Left Patch Set: Created 9 years, 5 months ago
Right Patch Set: Created 6 years, 6 months ago
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
Right: Side by side diff | Download
« no previous file with change/comment | « Lib/inspect.py ('k') | Lib/test/test_inspect.py » ('j') | no next file with change/comment »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
LEFTRIGHT
(no file at all)
1 # line 1 1 # line 1
2 def wrap(foo=None): 2 def wrap(foo=None):
3 def wrapper(func): 3 def wrapper(func):
4 return func 4 return func
5 return wrapper 5 return wrapper
6 6
7 # line 7 7 # line 7
8 def replace(func): 8 def replace(func):
9 def insteadfunc(): 9 def insteadfunc():
10 print('hello') 10 print('hello')
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
102 def keyworded(*arg1, arg2=1): 102 def keyworded(*arg1, arg2=1):
103 pass 103 pass
104 104
105 #line 105 105 #line 105
106 def annotated(arg1: list): 106 def annotated(arg1: list):
107 pass 107 pass
108 108
109 #line 109 109 #line 109
110 def keyword_only_arg(*, arg): 110 def keyword_only_arg(*, arg):
111 pass 111 pass
112
113 from functools import wraps
114
115 def decorator(func):
116 @wraps(func)
117 def fake():
118 return 42
119 return fake
120
121 #line 121
122 @decorator
123 def real():
124 return 20
LEFTRIGHT

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