[Zope] Which method to generate IDs for objects?

Juergen R. Plasser / HEXAGON plasser@hexagon.at
Wed, 16 Jan 2002 17:51:30 +0100


Hi Maik!

Thanks for your quick answer.

--On Mittwoch, 16. J=E4nner 2002 15:13 +0100 Maik Jablonski=20
<maik.jablonski@uni-bielefeld.de> wrote:

> another way could be:
>
> id =3D "objId_%d" % len(container.objectValues())
>
> this results in unique values if you don't delete an object out of the
> container...
>
> i think there may be better ways, but hope this helps a bit...

Thanks, it helped a lot. With the id of the last object inserted into the=20
container I could create a sequence of ids. Is there a simple way to get=20
this id?

Juergen