1 | n/a | # line 1 |
---|
2 | n/a | def wrap(foo=None): |
---|
3 | n/a | def wrapper(func): |
---|
4 | n/a | return func |
---|
5 | n/a | return wrapper |
---|
6 | n/a | |
---|
7 | n/a | # line 7 |
---|
8 | n/a | def replace(func): |
---|
9 | n/a | def insteadfunc(): |
---|
10 | n/a | print('hello') |
---|
11 | n/a | return insteadfunc |
---|
12 | n/a | |
---|
13 | n/a | # line 13 |
---|
14 | n/a | @wrap() |
---|
15 | n/a | @wrap(wrap) |
---|
16 | n/a | def wrapped(): |
---|
17 | n/a | pass |
---|
18 | n/a | |
---|
19 | n/a | # line 19 |
---|
20 | n/a | @replace |
---|
21 | n/a | def gone(): |
---|
22 | n/a | pass |
---|
23 | n/a | |
---|
24 | n/a | # line 24 |
---|
25 | n/a | oll = lambda m: m |
---|
26 | n/a | |
---|
27 | n/a | # line 27 |
---|
28 | n/a | tll = lambda g: g and \ |
---|
29 | n/a | g and \ |
---|
30 | n/a | g |
---|
31 | n/a | |
---|
32 | n/a | # line 32 |
---|
33 | n/a | tlli = lambda d: d and \ |
---|
34 | n/a | d |
---|
35 | n/a | |
---|
36 | n/a | # line 36 |
---|
37 | n/a | def onelinefunc(): pass |
---|
38 | n/a | |
---|
39 | n/a | # line 39 |
---|
40 | n/a | def manyargs(arg1, arg2, |
---|
41 | n/a | arg3, arg4): pass |
---|
42 | n/a | |
---|
43 | n/a | # line 43 |
---|
44 | n/a | def twolinefunc(m): return m and \ |
---|
45 | n/a | m |
---|
46 | n/a | |
---|
47 | n/a | # line 47 |
---|
48 | n/a | a = [None, |
---|
49 | n/a | lambda x: x, |
---|
50 | n/a | None] |
---|
51 | n/a | |
---|
52 | n/a | # line 52 |
---|
53 | n/a | def setfunc(func): |
---|
54 | n/a | globals()["anonymous"] = func |
---|
55 | n/a | setfunc(lambda x, y: x*y) |
---|
56 | n/a | |
---|
57 | n/a | # line 57 |
---|
58 | n/a | def with_comment(): # hello |
---|
59 | n/a | world |
---|
60 | n/a | |
---|
61 | n/a | # line 61 |
---|
62 | n/a | multiline_sig = [ |
---|
63 | n/a | lambda x, \ |
---|
64 | n/a | y: x+y, |
---|
65 | n/a | None, |
---|
66 | n/a | ] |
---|
67 | n/a | |
---|
68 | n/a | # line 68 |
---|
69 | n/a | def func69(): |
---|
70 | n/a | class cls70: |
---|
71 | n/a | def func71(): |
---|
72 | n/a | pass |
---|
73 | n/a | return cls70 |
---|
74 | n/a | extra74 = 74 |
---|
75 | n/a | |
---|
76 | n/a | # line 76 |
---|
77 | n/a | def func77(): pass |
---|
78 | n/a | (extra78, stuff78) = 'xy' |
---|
79 | n/a | extra79 = 'stop' |
---|
80 | n/a | |
---|
81 | n/a | # line 81 |
---|
82 | n/a | class cls82: |
---|
83 | n/a | def func83(): pass |
---|
84 | n/a | (extra84, stuff84) = 'xy' |
---|
85 | n/a | extra85 = 'stop' |
---|
86 | n/a | |
---|
87 | n/a | # line 87 |
---|
88 | n/a | def func88(): |
---|
89 | n/a | # comment |
---|
90 | n/a | return 90 |
---|
91 | n/a | |
---|
92 | n/a | # line 92 |
---|
93 | n/a | def f(): |
---|
94 | n/a | class X: |
---|
95 | n/a | def g(): |
---|
96 | n/a | "doc" |
---|
97 | n/a | return 42 |
---|
98 | n/a | return X |
---|
99 | n/a | method_in_dynamic_class = f().g |
---|
100 | n/a | |
---|
101 | n/a | #line 101 |
---|
102 | n/a | def keyworded(*arg1, arg2=1): |
---|
103 | n/a | pass |
---|
104 | n/a | |
---|
105 | n/a | #line 105 |
---|
106 | n/a | def annotated(arg1: list): |
---|
107 | n/a | pass |
---|
108 | n/a | |
---|
109 | n/a | #line 109 |
---|
110 | n/a | def keyword_only_arg(*, arg): |
---|
111 | n/a | pass |
---|
112 | n/a | |
---|
113 | n/a | @wrap(lambda: None) |
---|
114 | n/a | def func114(): |
---|
115 | n/a | return 115 |
---|
116 | n/a | |
---|
117 | n/a | class ClassWithMethod: |
---|
118 | n/a | def method(self): |
---|
119 | n/a | pass |
---|
120 | n/a | |
---|
121 | n/a | from functools import wraps |
---|
122 | n/a | |
---|
123 | n/a | def decorator(func): |
---|
124 | n/a | @wraps(func) |
---|
125 | n/a | def fake(): |
---|
126 | n/a | return 42 |
---|
127 | n/a | return fake |
---|
128 | n/a | |
---|
129 | n/a | #line 129 |
---|
130 | n/a | @decorator |
---|
131 | n/a | def real(): |
---|
132 | n/a | return 20 |
---|
133 | n/a | |
---|
134 | n/a | #line 134 |
---|
135 | n/a | class cls135: |
---|
136 | n/a | def func136(): |
---|
137 | n/a | def func137(): |
---|
138 | n/a | never_reached1 |
---|
139 | n/a | never_reached2 |
---|