Does Python really follow its philosophy of "Readability counts"?

Luis Zarrabeitia kyrie at uh.cu
Tue Jan 27 16:44:24 EST 2009


On Tuesday 27 January 2009 02:56:51 pm Russ P. wrote:
> On Jan 27, 11:40 am, Luis Zarrabeitia <ky... at uh.cu> wrote:
> > I think you still fail to see that what we are objecting is not that the
> > original writer can "optionally" use the enforced data hiding (which, as
> > someone pointed out before me, can be done with tools like pylint). The
> > objection is about the _user_ of the library. If you don't force it into
> > the _user_, how is it different from the current situation? And if you do
> > force it, how can you say that it is optional?
>
> As I have pointed out several times, the user cannot be forced to
> respect data hiding if he has access to the source code (and the right
> to modify it). If Python had a "private" keyword (or equivalent), for
> example, the user would only need to delete it wherever necessary to
> gain the desired access.

And, as others and I have pointed out several times, that would mean to 
maintain a fork. Would you say that current C++ has "optional" enforced data 
hiding for the user? After all, you can just fork the module (and if you 
don't have the source, you could mess with pointers until you find it).

Also, I once pointed out that "access to the source code and right to modify 
it" is not a given.

What you are proposing is not optional at all. You want the power to control 
what others do - and while it may be your legal right, it's also everyone 
else's right not go our of our ways to help you have it.

-- 
Luis Zarrabeitia (aka Kyrie)
Fac. de Matemática y Computación, UH.
http://profesores.matcom.uh.cu/~kyrie



More information about the Python-list mailing list