def get_data_set(self, name, data):
    '\n        This horribly ugly little function is in charge of returning a list of\n        data entries, given filter states, for a filter set. It does the same\n        thing as get_data, but for every item in a filter set, returning the\n        results in a list.\n        '
    if (not self.filter_set):
        return [self.get_data(name, data)]
    delete = data.get('delete', None)
    delete_index = None
    if delete:
        (n, i) = delete.split('.')
        if (n == name):
            delete_index = (int(i) + 1)
    filter_state_names = self.filter_state_names[:]
    filter_state_list = [data.getlist((state_name % name), []) for state_name in filter_state_names]
    filter_states = zip(*filter_state_list)
    data_set = []
    for i in range(len(filter_states)):
        if (i == delete_index):
            continue
        state = filter_states[i]
        filter_dict = {}
        for i in range(0, len(filter_state_names)):
            filter_dict.update({(filter_state_names[i] % name): state[i]})
        cleaned_data = self.clean_data(name, filter_dict)
        if cleaned_data:
            data_elem = cleaned_data
            data_set.append(data_elem)
    return data_set
This horribly ugly little function is in charge of returning a list of
data entries, given filter states, for a filter set. It does the same
thing as get_data, but for every item in a filter set, returning the
results in a list.
def get_data_set(self, name, data):
    '\n        This horribly ugly little function is in charge of returning a list of\n        data entries, given filter states, for a filter set. It does the same\n        thing as get_data, but for every item in a filter set, returning the\n        results in a list.\n        '
    if (not self.filter_set):
        return [self.get_data(name, data)]
    delete = data.get('delete', None)
    delete_index = None
    if delete:
        (n, i) = delete.split('.')
        if (n == name):
            delete_index = (int(i) + 1)
    filter_state_names = self.filter_state_names[:]
    filter_state_list = [data.getlist((state_name % name), []) for state_name in filter_state_names]
    filter_states = zip(*filter_state_list)
    data_set = []
    for i in range(len(filter_states)):
        if (i == delete_index):
            continue
        state = filter_states[i]
        filter_dict = {}
        for i in range(0, len(filter_state_names)):
            filter_dict.update({(filter_state_names[i] % name): state[i]})
        cleaned_data = self.clean_data(name, filter_dict)
        if cleaned_data:
            data_elem = cleaned_data
            data_set.append(data_elem)
    return data_set