don't need dictionary's keys - hash table?

Diez B. Roggisch deets at nospam.web.de
Wed Jul 12 18:27:57 EDT 2006


Please don't top post. I had to fix that below.

>>> Any other thoughts or considerations are appreciated.
>> You could try and create a md5 sum of your strings and use that as key. It
>> _should_ be good enough, but I'm no crypto expert so take that with a grain
>> of salt.

 > It should be enough but it might be a little slower than hash(string).

hash alone won't be sufficient, as it is guaranteed to have to much 
collisions. The OP already figured that out, btw.

Diez



More information about the Python-list mailing list