[Zope-dev] Re: Zope 2.7: OrderSupport for ObjectManager
Florent Guillaume
fg@nuxeo.com
Tue, 6 May 2003 13:15:36 +0200
In article <3EB78D0E.3030903@web.de> you write:
> >>> <http://mail.zope.org/pipermail/zope-dev/2002-July/016913.html>
> >>
> >> I did that on request of Florent and thought it would be a no-brainer.
> >> <http://mail.zope.org/pipermail/zope-checkins/2003-April/022598.html>
> >>
> >> But apparently I did it wrong. Would it be ok to change it to:
> >>
> >> def __init__(id=None):
> >> if id is not None:
> >> self.id = str(id)
> >>
> >> Or should I revert that change completely?
> >>
> >
> > Why not add the title as well? It seems common for constructors that
> > accept an id parameter to also accept a title.
>
> ZopePageTemplate and PythonScript constructors don't accept title.
> Florent just asked for id.
> But I can live with both solutions.
I think that having the constructor set id is the thing that minimises
surprises. But that's just a small cleanup I requested, if it poses
problem just forget about it.
Florent
--
Florent Guillaume, Nuxeo (Paris, France)
+33 1 40 33 79 87 http://nuxeo.com mailto:fg@nuxeo.com