Lennart Regebro wrote at 2003-2-1 15:48 +0100:
From: "Max M" <maxm@mxm.dk>
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() ??
You use another method that in turn calls _setObject.
Now you may argue that there should be a public method that does the same, but that is strictly another question.
Every time you make an object that subclasses ObjectManager, wich is often, you need to use that function. That can hardly be called private.
It depends on what you define as "private". I have never seen the use of shielding a method from future subclasses of a class. It only causes problems and unessecary restrictions. For me, private means that you shield it from use outside of the object, not from your subclasses. Some more notes about "private".
"private" as used in Zope is not the "private used in C++ (or Java)". In Python, "C++'s private" is emulated by names starting with "__" (and not ending in "__"). Such attributes can not be (easily) accessed by subclasses. Zope's private means "cannot be used by TTW code". Dieter