[Zope3-dev] Should containers tell you if they accept empty string keys?
Florent Guillaume
fg@nuxeo.com
Mon, 18 Nov 2002 20:58:01 +0000 (UTC)
Guido van Rossum <guido@python.org> wrote:
> > > 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.
Note that Zope 2 objects have the option to declare
__replaceable__ = Globals.REPLACEABLE
to allow themselves to be overwritten by another object with the same id.
However I don't know what it's used for in Zope 2, and if it's a planned
feature for Zope 3.
Florent
--
Florent Guillaume, Nuxeo (Paris, France)
+33 1 40 33 79 87 http://nuxeo.com mailto:fg@nuxeo.com