Why does python not have a mechanism for data hiding?

Russ P. Russ.Paielli at gmail.com
Wed Jun 11 15:28:22 EDT 2008


On Jun 11, 2:36 am, Paul Boddie <p... at boddie.org.uk> wrote:

> Maybe, but I'd hope that some of those programmers would be at least
> able to entertain what Russ has been saying rather than setting
> themselves up in an argumentative position where to concede any
> limitation in Python might be considered some kind of weakness that
> one should be unwilling to admit.

Thanks. I sometimes get the impression that Desthuilliers thinks of
this forum like a pack of dogs, where he is the top dog and I am a
newcomer who needs to be put in his place. I just wish he would take a
chill pill and give it a rest. I am not trying to challenge his
position as top dog.

All I did was to suggest that a keyword be added to Python to
designate private data and methods without cluttering my cherished
code with those ugly leading underscores all over the place. I don't
like that clutter any more than I like all those semi-colons in other
popular languages. I was originally attracted to Python for its clean
syntax, but when I learned about the leading-underscore convention I
nearly gagged.

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?



More information about the Python-list mailing list