[Tutor] Generating unique ID

Timo List timomlists at gmail.com
Wed Oct 28 19:52:24 CET 2009


I'm writing an application which will hold a database of people. Ofcourse,
people can have the same name, so I want to stock them with an unique ID.

I've searched and found some things:
- uuid.uuid4()
- id(name)
- os.urandom(n)

But they seem overkill to me. Well, maybe not id().

What should I use the best for this? Maybe examples of other programs that
do something alike?

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tutor/attachments/20091028/84095928/attachment.htm>

More information about the Tutor mailing list