def _cross_exec(set_tuple):
    """
    Function used by cross() to generate the cross-product of a tuple
    """
    resulting_set = []
    if len(set_tuple) == 1:
        for val in set_tuple[0]:
            resulting_set.append([val])
    else:
        tmp_set = _cross_exec(set_tuple[1:])
        for val in set_tuple[0]:
            for item in tmp_set:
                #print val, item
                resulting_set.append([val] + item)
    return resulting_set