Derek Richardson wrote:
I believe that that will not guarantee a *universally* unique id, but
only an id unique within that ZODB. Am I wrong?
The RFC prescribes a specific algorithm for generating universally
Of course, they are only "universally unique" in a probabilistic way.
It wouldn't be difficult to salt the integer IDs such that they generate
UUIDs that are as likely as any other to be unique. Something like this
int_id = 42
salt = 0x32352352353243263235235235324326
print uuid.UUID('%X' % (int_id ^ salt))
Another option would be to create an IOBtree to map each object's intid
to a randomly generated UUID (generated by the uuid.uuid1 method from
the earlier referenced module).
Senior Software Engineer
Zope3-users mailing list