def aux_insertTree ( childTree , parentTree ) : if childTree . x1 != None and childTree . x2 != None : parentTree . insert ( childTree . x1 , childTree . x2 , childTree . name , childTree . referedObject ) for c in childTree . children : aux_insertTree ( c , parentTree )
recursive inser binary tree nodes python
This a private ( You shouldn t have to call it ) recursive function that inserts a child tree into a parent tree .
def aux_insertTree(childTree, parentTree):
	"""This a private (You shouldn't have to call it) recursive function that inserts a child tree into a parent tree."""
	if childTree.x1 != None and childTree.x2 != None :
		parentTree.insert(childTree.x1, childTree.x2, childTree.name, childTree.referedObject)

	for c in childTree.children:
		aux_insertTree(c, parentTree)