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