Lines Matching refs:self
35 def __init__(self, func, time = None, parent = None):
36 self._func = func
37 self._time = time
39 self._parent = CallTree.ROOT
41 self._parent = parent
42 self._children = []
44 def calls(self, func, calltime):
49 child = CallTree(func, calltime, self)
50 self._children.append(child)
53 def getParent(self, func):
59 tree = self
67 def __repr__(self):
68 return self.__toString("", True)
70 def __toString(self, branch, lastChild):
71 if self._time is not None:
72 s = "%s----%s (%s)\n" % (branch, self._func, self._time)
74 s = "%s----%s\n" % (branch, self._func)
79 while i < len(self._children):
80 if i != len(self._children) - 1:
81 s += "%s" % self._children[i].__toString(branch +\
84 s += "%s" % self._children[i].__toString(branch +\