[Zope-dev] oh boy [id,getId() madness]
Adrian van den Dries
avdd@flow.com.au
Thu, 12 Jun 2003 11:26:12 +1000
On June 11, Stefan H. Holek wrote:
> This is definitely possible. You probably have a faulty factory method. In
> Zope, construction is a two step process that looks something like
>
> def addSomething(self, id, title=''):
> ob = Something(id, title)
> self._setObject(id, ob)
That's why this should be:
def addSomething(self, id):
ob = Something(id)
self._setObject(ob.getId(), ob)
But I notice nobody seems to do this.
a.
--
Adrian van den Dries avdd@flow.com.au
Development team www.dev.flow.com.au
FLOW Communications Pty. Ltd. www.flow.com.au