Will python never intend to support private, protected and public?

Simon Brunning simon.brunning at gmail.com
Wed Sep 28 13:05:21 CEST 2005


On 9/28/05, could ildg <could.net at gmail.com> wrote:
> Python is wonderful except that it has no real private and protected
> properties and methods.
> Every py object has dict so that you can easily find what fields and methods
> an obj has,
> this is very convenient, but because of this, py is very hard to support
> real private and
> protected?

My convention, attributes with names prefixed with a single underscore
are private. There's nothing to stop anyone using these, but, well, if
you take the back off the radio, the warranty is void.

> If private and protected is supported, python will be perfect.

If *real* private and protected are *enforced*, Python will be the
poorer for it. See
<http://groups.google.com/group/comp.lang.python/msg/b977ed1312e10b21>.

--
Cheers,
Simon B,
simon at brunningonline.net,
http://www.brunningonline.net/simon/blog/



More information about the Python-list mailing list