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

James Mills prologic at shortcircuit.net.au
Tue Jan 13 22:14:46 EST 2009


On Wed, Jan 14, 2009 at 12:57 PM, Terry Reedy <tjreedy at udel.edu> wrote:
> public = no leading underscore
> private = one leading underscore
> protected = two leading underscores
>
> Python uses encapsulation by convention rather than by enforcement.

As mentioned previously this is not encapsulation, but
access control. But yes correct, this is how we conventionally
define access control over members of an object. It's up to the
programmer correctly adhere to the interface(s).

--JamesMills



More information about the Python-list mailing list