Return a list of string reprs from a nested list of referrers.
(self, tree)
| 86 | return '%s: %s' % (type(obj), r) |
| 87 | |
| 88 | def format(self, tree): |
| 89 | """Return a list of string reprs from a nested list of referrers.""" |
| 90 | output = [] |
| 91 | |
| 92 | def ascend(branch, depth=1): |
| 93 | for parent, grandparents in branch: |
| 94 | output.append((' ' * depth) + self._format(parent)) |
| 95 | if grandparents: |
| 96 | ascend(grandparents, depth + 1) |
| 97 | ascend(tree) |
| 98 | return output |
| 99 | |
| 100 | |
| 101 | def get_instances(cls): |
no outgoing calls