File tree Expand file tree Collapse file tree 1 file changed +0
-156
lines changed Expand file tree Collapse file tree 1 file changed +0
-156
lines changed Original file line number Diff line number Diff line change 1818nlocals: 2
1919flags: 3
2020consts: ('<code object g>',)
21- variable counts:
22- total: 2
23- locals:
24- total: 2
25- args:
26- total: 1
27- posonly: 0
28- posorkw: 1
29- kwonly: 0
30- varargs: False
31- varkwargs: False
32- pure: 1
33- cells:
34- total: 1
35- args: 1
36- others: 0
37- hidden:
38- total: 0
39- pure: 0
40- cells: 0
41- free (nonlocal): 0
42- unbound:
43- total: 0
44- global: 0
45- attrs: 0
46- unknown: 0
4721
4822>>> dump(f(4).__code__)
4923name: g
5731nlocals: 1
5832flags: 19
5933consts: ('None',)
60- variable counts:
61- total: 2
62- locals:
63- total: 1
64- args:
65- total: 1
66- posonly: 0
67- posorkw: 1
68- kwonly: 0
69- varargs: False
70- varkwargs: False
71- pure: 0
72- cells:
73- total: 0
74- args: 0
75- others: 0
76- hidden:
77- total: 0
78- pure: 0
79- cells: 0
80- free (nonlocal): 1
81- unbound:
82- total: 0
83- global: 0
84- attrs: 0
85- unknown: 0
8634
8735>>> def h(x, y):
8836... a = x + y
10351nlocals: 5
10452flags: 3
10553consts: ('None',)
106- variable counts:
107- total: 5
108- locals:
109- total: 5
110- args:
111- total: 2
112- posonly: 0
113- posorkw: 2
114- kwonly: 0
115- varargs: False
116- varkwargs: False
117- pure: 3
118- cells:
119- total: 0
120- args: 0
121- others: 0
122- hidden:
123- total: 0
124- pure: 0
125- cells: 0
126- free (nonlocal): 0
127- unbound:
128- total: 0
129- global: 0
130- attrs: 0
131- unknown: 0
13254
13355>>> def attrs(obj):
13456... print(obj.attr1)
14769nlocals: 1
14870flags: 3
14971consts: ('None',)
150- variable counts:
151- total: 5
152- locals:
153- total: 1
154- args:
155- total: 1
156- posonly: 0
157- posorkw: 1
158- kwonly: 0
159- varargs: False
160- varkwargs: False
161- pure: 0
162- cells:
163- total: 0
164- args: 0
165- others: 0
166- hidden:
167- total: 0
168- pure: 0
169- cells: 0
170- free (nonlocal): 0
171- unbound:
172- total: 4
173- global: 1
174- attrs: 3
175- unknown: 0
17672
17773>>> def optimize_away():
17874... 'doc string'
209105nlocals: 3
210106flags: 3
211107consts: ('None',)
212- variable counts:
213- total: 3
214- locals:
215- total: 3
216- args:
217- total: 3
218- posonly: 0
219- posorkw: 2
220- kwonly: 1
221- varargs: False
222- varkwargs: False
223- pure: 0
224- cells:
225- total: 0
226- args: 0
227- others: 0
228- hidden:
229- total: 0
230- pure: 0
231- cells: 0
232- free (nonlocal): 0
233- unbound:
234- total: 0
235- global: 0
236- attrs: 0
237- unknown: 0
238108
239109>>> def posonly_args(a,b,/,c):
240110... return a,b,c
252122nlocals: 3
253123flags: 3
254124consts: ('None',)
255- variable counts:
256- total: 3
257- locals:
258- total: 3
259- args:
260- total: 3
261- posonly: 2
262- posorkw: 1
263- kwonly: 0
264- varargs: False
265- varkwargs: False
266- pure: 0
267- cells:
268- total: 0
269- args: 0
270- others: 0
271- hidden:
272- total: 0
273- pure: 0
274- cells: 0
275- free (nonlocal): 0
276- unbound:
277- total: 0
278- global: 0
279- attrs: 0
280- unknown: 0
281125
282126>>> def has_docstring(x: str):
283127... 'This is a one-line doc string'
You can’t perform that action at this time.
0 commit comments