'@param strictkey: True if you want a KeyError in the case that
key is not there, False if you want a reference to default
in the case that key is not there
@param default: the object to return if key is not there; This
is ignored if strictkey.
@return: the object removed or default if there is not item by
that key and strictkey is False'

def __delitem__(self, key, default=None, strictkey=True):

    assert self._assert_invariants()
    if self.d.has_key(key):
        val = self.d.pop(key)
        i = bisect_left(self.l, (val, key))
        while ((self.l[i][0] is not val) or (self.l[i][1] is not key)):
            i += 1
        self.l.pop(i)
        assert self._assert_invariants()
        return val
    elif strictkey:
        assert self._assert_invariants()
        raise KeyError, key
    else:
        assert self._assert_invariants()
        return default
