It would be good to make a few changes for Python 3.
range instead of xrange and print as a function.
In lines 49 to 56:
for _ in range(d):
table = array.array("l", (0 for _ in range(m)))
self.tables.append(table)
self.salt.append(hash(str(id(table))))
def _hash(self, x):
for s in self.salt:
print (hash((x, s)))
It would be good to make a few changes for Python 3.
range
instead ofxrange
andprint
as a function.In lines 49 to 56: