print(i, 2 ** i, int(2 ** i / 1.5))
probe_mask = 2 ** i - 1
print(hex(probe_mask))


class Foo(object):
    pass
olist = [Foo() for j in range(n)]
hashes = [hash(o) for o in olist]
print(len(set(hashes)))
probes = [(h & probe_mask) for h in hashes]
print(len(set(probes)))
Подсчет коллизий в словаре Python