(self, tree)
return [path[0], list(set(_path))]
遍历多叉树，获取模板列表
遍历多叉树，获取模板列表
遍历多叉树，获取模板列表
def traversal_tree(self, tree):
        """ 遍历多叉树，获取模板列表
        """
        _nodes, path, sub_path = [], [], []

        path.append(tree._head.get_data())

        self._traversal(tree._head, path, sub_path)

        path.extend(sub_path)
        _path = [tuple(x) for x in path[1:]]

        return [path[0], list(set(_path))]
def traversal_tree ( self , tree ) : _nodes , path , sub_path = [ ] , [ ] , [ ] path . append ( tree . _head . get_data ( ) ) self . _traversal ( tree . _head , path , sub_path ) path . extend ( sub_path ) _path = [ tuple ( x ) for x in path [ 1 : ] ] return [ path [ 0 ] , list ( set ( _path ) ) ]