(self, filename, use_tuples=False)
Saves the transposition table to a serial JSON file. Warning: the file
        can be big (~100Mo).
Saves the transposition table to a serial JSON file. Warning: the file
        can be big (~100Mo).
Saves the transposition table to a serial JSON file . Warning : the file can be big ( ~100Mo ) .
def to_json_file(self, filename, use_tuples=False):
        """Saves the transposition table to a serial JSON file. Warning: the file
        can be big (~100Mo)."""
        if use_tuples:
            with open(filename, "w") as f:
                k = self.d.keys()
                v = self.d.values()
                k1 = [str(i) for i in k]
                json.dump(dict(zip(*[k1, v])), f, ensure_ascii=False)
        else:
            with open(filename, "w") as f:
                json.dump(self.d, f, ensure_ascii=False)
def to_json_file ( self , filename , use_tuples = False ) : if use_tuples : with open ( filename , "w" ) as f : k = self . d . keys ( ) v = self . d . values ( ) k1 = [ str ( i ) for i in k ] json . dump ( dict ( zip ( * [ k1 , v ] ) ) , f , ensure_ascii = False ) else : with open ( filename , "w" ) as f : json . dump ( self . d , f , ensure_ascii = False )