-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathtracefunc.py
More file actions
executable file
·72 lines (38 loc) · 837 Bytes
/
Copy pathtracefunc.py
File metadata and controls
executable file
·72 lines (38 loc) · 837 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
#! /usr/bin/env python3
import diagnosticism as d
@d.tracefunc
def func1():
pass
@d.tracefunc
def func2(x, y):
pass
@d.tracefunc
def func3(x, y, **options):
z = x * y
return z
@d.tracefunc
def func4(x, y, *args):
pass
@d.tracefunc
def func5(x, y, *args, **options):
pass
class Thing:
@d.tracefunc
def __init__(self):
pass
@d.tracefunc
def some_method(self, x, y, z):
pass
d.enable_tracing(('DIAGNOSTICISM_ENABLE_TRACING', 'ENABLE_TRACING'), True)
func1()
func2('abc', 12)
func3('abc', 12)
func3('abc', 12, pos='left')
func4('abc', 12)
func4('abc', 12, 13, 14, 15)
func5('abc', 12)
func5('abc', 12, 13, 14, 15)
func5('abc', 12, pos='left', length=10)
func5('abc', 12, 13, 14, 15, pos='left', length=10)
thing = Thing()
thing.some_method(-1, 0, +1)