[ZODB-Dev] create unique container keys

Stephan Richter srichter at cosmos.phy.tufts.edu
Thu Apr 2 08:48:06 EDT 2009


On Thursday 02 April 2009, Adam GROSZER wrote:
> Yeah, uuid was my guess.

Christian was not necessarily thinking uuid. I think the common algorithm is:

x = random.randint(10**9)
while str(x) in container:
    x += 1

Regards,
Stephan
-- 
Stephan Richter
Web Software Design, Development and Training
Google me. "Zope Stephan Richter"


More information about the ZODB-Dev mailing list