def insertChild(self, child): child.parent = self bisect.insort(self.children, (child.orderKey(), child))