'@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 value 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):
        node = self.d[key]
        self.d[node[1]][2] = node[2]
        self.d[node[2]][1] = node[1]
        del self.d[key]
        assert self._assert_invariants()
        return node[0]
    elif strictkey:
        assert self._assert_invariants()
        raise KeyError, key
    else:
        assert self._assert_invariants()
        return default
