'For all cards with index above idx, increment or decrement its index
value in the keyword_indices dict.'

def _updateindices(self, idx, increment=True):

    if (idx > len(self._cards)):
        return
    increment = (1 if increment else (-1))
    for index_sets in (self._keyword_indices, self._rvkc_indices):
        for indices in itervalues(index_sets):
            for (jdx, keyword_index) in enumerate(indices):
                if (keyword_index >= idx):
                    indices[jdx] += increment
