CountFields/hedayra
CountFields/SaurinK
n1def fcounter(C, *params):n1def fcounter(C, *args):
2    obj = C(*params)2    obj = C(*args)
3    cm, cf, om, of = [], [], [], []3    cf, cm, of, om = [], [], [], []
4    # f = field, m = method
5    methods = dir(C)
6    for m in methods:
7        if m[0] != '_':
8            if callable(getattr(C, m)):
9                cm.append(m)
10            else:
11                cf.append(m)
412
n5    fields = dir(C)n13    methods = dir(obj)
6    for f in fields:14    for m in methods:
7        if f[0] != '_':15        if m[0] != '_':
8            if callable(getattr(Cf)):16            if callable(getattr(objm)):
17                if m not in cm:
9                cm.append(f)18                    om.append(m)
10            else:19            else:
t11                cf.append(f)t
12 
13    fields = dir(obj)
14    for f in fields:
15        if f[0] != '_':
16            if callable(getattr(obj, f)):
17                if f not in cm:
18                    om.append(f)
19            else:
20                if f not in cf:20                if m not in cf:
21                    of.append(f)21                    of.append(m)
22 
23    return cm, cf, om, of22    return cm, cf, om, of
2423
Legends
Colors
 Added 
Changed
Deleted
Links
(f)irst change
(n)ext change
(t)op