don't need dictionary's keys - hash table?
Fredrik Lundh
fredrik at pythonware.com
Wed Jul 12 13:33:30 EDT 2006
Nick Vatamaniuc wrote:
> If you don't really want to store the keys, just use
> dic[hash(key)]=value, this way the dictionary will have the same shape
> and distribution of keys as dic[key]=value because
> hash('abc')=hash(hash('abc')) but the long string of actual keys are
> not referenced by the dictionary.
how come you're so sure that there will never be any collisions ?
</F>
More information about the Python-list
mailing list