n | def fcounter(self, *args): | n | def fcounter(Cl, *args): |
| q = self(*args) | | c = Cl(*args) |
| d = {0: [], 1: [], 2: [], 3: []} | | res = {0: [], 1: [], 2: [], 3: []} |
| | | |
n | for item in dir(self): | n | for item in dir(Cl): |
| if item[0] != "_": | | if item[0] != "_": |
n | if callable(getattr(self, item)): | n | if callable(getattr(Cl, item)): |
| d[0].append(item) | | res[0].append(item) |
| else: | | else: |
n | d[1].append(item) | n | res[1].append(item) |
| | | |
n | for item in dir(q): | n | for item in dir(c): |
| if item[0] != "_": | | if item[0] != "_": |
n | if callable(getattr(q, item)): | n | if callable(getattr(c, item)): |
| d[2].append(item) | | res[2].append(item) |
| else: | | else: |
n | d[3].append(item) | n | res[3].append(item) |
| | | |
n | d[2] = [i for i in d[2] if i not in d[0]] | n | res[2] = [i for i in res[2] if i not in res[0]] |
| d[3] = [i for i in d[3] if i not in d[1]] | | res[3] = [i for i in res[3] if i not in res[1]] |
| | | |
n | map(sorted, d.values()) | n | map(sorted, res.values()) |
| | | |
t | return d[0], d[1], d[2], d[3] | t | return res[0], res[1], res[2], res[3] |
| | | |