Protected Methods and Python
Jp Calderone
exarkun at intarweb.us
Sun Apr 13 15:16:56 EDT 2003
On Sun, Apr 13, 2003 at 11:58:36AM -0700, srijit at yahoo.com wrote:
> I do not see a concept of Protected Methods in Python 2.2 like C++ and Ruby.
> Is this a serious limitation for Object Oriented Programing with Python?
Not in my experience.
> Or may be it is possible to emulated Protected Methods in Python.
If you have methods you don't want people calling, simply do one of the
folloowing:
1) Document them as such
2) Prefix their names with "_"
3) Don't document them at all
> I look forward to some discussion by OOP experts.
It may just be me, but I don't see how this has anything to do with object
oriented design/programming.
Jp
--
Somewhere, something incredible is waiting to be known.
-- Carl Sagan
--
up 24 days, 15:01, 1 user, load average: 0.99, 0.90, 0.85
More information about the Python-list
mailing list