Steven D'Aprano <[EMAIL PROTECTED]> writes: > def unique_id(): > n = 1234567890 > while True: > yield n > n += 1
unique_id = itertools.count(1234567890)
> which is easy enough, but I thought I'd check if there was an existing
> solution in the standard library that I missed. Also, for other
> applications, I might want them to be rather less predictable.
def unique_id():
return os.urandom(10).encode('hex')
--
http://mail.python.org/mailman/listinfo/python-list
