Andy Dawkins wrote:
Chris
I the meantime I have changed that method to the following:
def insertReverseIndexEntry(self, entry, documentId): """Insert the correct entry into the reverse indexes for future unindexing."""
newRow = self._unindex.get(documentId, []) if newRow: # Catch cases where we don't need to modify anything if entry in newRow: return 1
if type(newRow) == type([]): newRow.append(entry) elif type(newRow) == type(())): newRow = newRow + (entry,)
self._unindex[documentId] = newRow
People with an extremly keen eye (i.e. No one so far) may have noticed that I have an extra ) on this line:
elif type(newRow) == type(())):
So it should read:
elif type(newRow) == type(()):
Cheers -AndyD