def save(self, path=None):
        "Saves the database to path or most recently known path."
        if path is None:
            assert self.__path is not None, 'Path must be provided!'
            path = self.__path
        with open(path, 'wb') as file:
            file.write(bz2.compress(pickle.dumps(self)))
        self.__path = path
Saves the database to path or most recently known path.
recipes/Python/577825_Rudimentary_Database_Engine/recipe-577825.py