Generating unique numbers?

VanL vlindberg at verio.net
Fri May 31 17:31:52 EDT 2002


Is there a good algorithm for generating unique numbers 
(ints, specifically) that can be used as object identifiers?

I am discounding the obvious newid += 1 because I will need 
to merge different sets, and while I may have some number 
overlap, using a simple count for each object would 
guarantee that I have the maximum number of clashes.

Specifically, I will be using these numbers as dictionary keys.

Thanks,

VanL




More information about the Python-list mailing list