def __setitem__(self, key, value): with _lock: self.__check_closed() self.__size = -1 r = lib.gdbm_store(self.__ll_dbm, _fromstr(key), _fromstr(value), lib.GDBM_REPLACE) if r < 0: self.__raise_from_errno()