#NEWLINE# def append( self , child ) : #NEWLINE# #INDENT# 'append(child) -> element\n\n        Appends child and returns self if self is not full or first\n        non-full parent.' #NEWLINE# assert ( not self . full ( ) ) #NEWLINE# self . children . append ( child ) #NEWLINE# child . parent = self #NEWLINE# node = self #NEWLINE# while node . full ( ) : #NEWLINE# #INDENT# node = node . parent #NEWLINE# #UNINDENT# return node