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

James Mills prologic at
Fri Jan 23 06:38:49 CET 2009

On Fri, Jan 23, 2009 at 3:22 PM, Russ P. <Russ.Paielli at> wrote:

> My understanding is that the vast majority of Python software is
> provided as open source. Hence, I am a bit confused by all the talk
> about the need for freedom and openness in Python. If data hiding were
> enforced, and you need access to something marked as private, you can
> just change it to public in the source code. What's the problem?
> Note: that change would be much easier to make if a "private" (or
> perhaps "priv") keyword were used instead of the leading-underscore
> rule. The former would require a change in only one place (per
> attribute), whereas the latter would require a change of every
> occurrence of the attribute.
> So "enforced" access restrictions are trivial to work around with open
> source. But doesn't that mean that access restriction is pointless
> because it cannot be enforced anyway? Of course not. In a team
> project, the access restrictions will be enforced on the checked-in
> code. You can play around with the internals all you want in your own
> little world, but as when you are working with a team, you need to
> adhere to the interfaces they define (if any).

I'm going to say this very politely.

Python IS NOT Java.


More information about the Python-list mailing list