(self, child)
return node
append(child) -> element

        Appends child and returns self if self is not full or first
        non-full parent.
append(child) -> element
append ( child ) - > element
def append(self, child):
        """append(child) -> element

        Appends child and returns self if self is not full or first
        non-full parent."""

        assert not self.full()
        self.children.append(child)
        child.parent = self
        node = self
        while node.full():
            node = node.parent
        return node
def append ( self , child ) : assert not self . full ( ) self . children . append ( child ) child . parent = self node = self while node . full ( ) : node = node . parent return node