Why does python not have a mechanism for data hiding?

Patrick Mullen saluk64007 at gmail.com
Wed Jun 11 17:11:49 EDT 2008


On Wed, Jun 11, 2008 at 12:28 PM, Russ P. <Russ.Paielli at gmail.com> wrote:

>
> If Desthuilliers doesn't like my suggestion, then fine. If no other
> Python programmer in the world likes it, then so be it. But do we
> really need to get personal about it? Python will not be ruined if it
> gets such a keyword, and Desthuilliers would be perfectly free to
> continue using the leading-underscore convention if he wishes. Where
> is the threat to his way of life?
>

Well, you have to understand that a lot of python programmers are refugees
from the microsoft or sun worlds, where we were forced to do things a
certain way, and often it was not in our opinion the best way, but there
wasn't anything we could do about it.  Some of these refugees are very
experienced in that other world, and don't want to go back there.  So
proposing that python borrow these methods of control from the place we have
fled from can feel threatening.  Some people obviously take it more
personally than others, but this is a general feeling a lot of python
programmers share.

Also I'm fairly certain you're not the first to mention this topic.

Here's what the cookbook has to say:
http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/573442
Something like that is really your best bet.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20080611/297751b3/attachment-0001.html>


More information about the Python-list mailing list