CountFields/SaurinK
CountFields/hedayra
n1def fcounter(C, *args):n1def fcounter(C, *params):
2    obj = C(*args)2    obj = C(*params)
3    cf, cm, of, om = [], [], [], []3    cm, cf, om, of = [], [], [], []
4    # f = field, m = method4 
5    methods = dir(C)5    fields = dir(C)
6    for m in methods:6    for f in fields:
7        if m[0] != '_':7        if f[0] != '_':
8            if callable(getattr(C, m)):8            if callable(getattr(C, f)):
9                cm.append(m)9                cm.append(f)
10            else:10            else:
n11                cf.append(m)n11                cf.append(f)
1212
n13    methods = dir(obj)n13    fields = dir(obj)
14    for m in methods:14    for f in fields:
15        if m[0] != '_':15        if f[0] != '_':
16            if callable(getattr(obj, m)):16            if callable(getattr(obj, f)):
17                if m not in cm:17                if f not in cm:
18                    om.append(m)18                    om.append(f)
19            else:19            else:
t20                if m not in cf:t20                if f not in cf:
21                    of.append(m)21                    of.append(f)
22 
22    return cm, cf, om, of23    return cm, cf, om, of
2324
Legends
Colors
 Added 
Changed
Deleted
Links
(f)irst change
(n)ext change
(t)op