def open(self, filename: str) -> None: import gzip if filename.endswith(".index"): filename = filename[:-6] self._filename = filename self._dictdb = DictDB(filename, "read", 1)
def open(self, filename: str): filename_nox, ext = splitext(filename) if ext.lower() == ".index": filename = filename_nox self._dictdb = DictDB(filename, "write", 1) self._filename = filename