[Zope3-dev] Should containers tell you if they accept empty string keys?
Guido van Rossum
guido@python.org
Mon, 18 Nov 2002 14:48:08 -0500
> > Slightly off-topic (and perhaps misinformed): when setObject() returns
> > the key it generates, can you use that key to access the object?
>
> Yes.
OK, that's all I *really* worried about. ;-)
> > In
> > particular, if you pass the returned key to another call to
> > setObject(), will it overwrite the object whose setObject() call
> > returned that key, or will it generate a new key again???
>
> If the container doesn't ignore the key, it will generate a
> DuplicationError.
Ah, so setObject() can't be used to overwrite an existing object.
That simplifies things.
> > I'm worrying about idempotency here.
>
> You wouldn't expect setObject to be idempotent would you?
Given the previous item, no. :-)