Re: [Zope-dev] Why is it _setObject(), and why is it undocumented
by Max M other posts by this author
Feb 1 2003 2:16PM messages near this date
Re: [Zope-dev] Why is it _setObject(), and why is it undocumented
|
Re: [Zope-dev] Why is it _setObject(), and why is it undocumented
Lennart Regebro wrote:
> From: "maxm" <maxm@[...].dk>
>
> >Usually a private method is used purely as a mean of implementation. And
> >should never be called from other objects. This is not the case here, as
> >the method is clearly a part of the api.
>
>
> Well, no, it isn't really, since it starts with _. However, python do not in
> itself enforce privacy, so therefore you *can* call it. But by starting it
> with _ it is private by convention. Zope also implements some of this
> privacy, so you can't call it from Python scripts and so on.
Sorry but I don't see that. How on earth are you suposed to add an
object to an objectmanager, if you don't use _setObject() ??
Every time you make an object that subclasses ObjectManager, wich is
often, you need to use that function. That can hardly be called private.
--
hilsen/regards Max M Rasmussen, Denmark
http://www.futureport.dk/
Fremtiden, videnskab, skeptiscisme og transhumanisme
_______________________________________________
Zope-Dev maillist - Zope-Dev@[...].org
http://mail.zope.org/mailman/listinfo/zope-dev
** No cross posts or HTML encoding! **
(Related lists -
http://mail.zope.org/mailman/listinfo/zope-announce
http://mail.zope.org/mailman/listinfo/zope )
Thread:
maxm
Florent Guillaume
Florent Guillaume
Lennart Regebro
Dieter Maurer
Lennart Regebro
Max M
Leonardo Rochael Almeida
Dieter Maurer
maxm
Dieter Maurer
|