def load(cls, path):
"Loads database from path and tests identity."
with open(path, 'rb') as file:
obj = pickle.loads(bz2.decompress(file.read()))
assert isinstance(obj, cls), 'Could not load a database object!'
obj.__path = path
return obj
########################################################################
评论列表
文章目录