def safe_del(self, key, permissions=(P_READ,)): if not self.can_edit(key, permissions): raise HTTPUnauthorized("Cannot delete "+key) del self[key]