Private identifiers - naming

A. Lloyd Flanagan alloydflanagan at comcast.net
Thu May 6 14:55:18 EDT 2004


Yermat <loic at fejoz.net> wrote in message news:<c7diku$f1j$2 at arcturus.ciril.fr>...
> Sridhar R wrote:
> > 
> > But this is usually _difficult_ to read.  Imagine a module (which is a
> > common one) containing more private variables than public variables.
> > 
> > How cryptic it would be to see text with lot of __ in front of them !!
> > 
> > Any thoughts?
> 
> Do we really need private variable ?

Probably not, assuming all our developers are competent.  But it IS
very convenient to have a way to indicate what data attributes should
not be accessed, and __ is useful compromise between making them
totally hidden and making them too easy to modify.

I don't find it that hard to read, personally.



More information about the Python-list mailing list