[Zope-dev] Why is it _setObject(), and why is it undocumented
Lennart Regebro
lennart@regebro.nu
Sat, 1 Feb 2003 14:37:53 +0100
From: "maxm" <maxm@mxm.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.