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

Luis Zarrabeitia kyrie at uh.cu
Tue Jan 20 14:22:33 CET 2009


On Tuesday 20 January 2009 02:00:43 am Russ P. wrote:
> On Jan 19, 10:33 pm, Luis Zarrabeitia <ky... at uh.cu> wrote:
> > (Why do you keep calling it 'encapsulation'?).
>
> I keep calling it encapsulation because that is a widely accepted,
> albeit not universal, definition of encapsulation. 

[...]

> Encapsulation conceals the functional details of a class from objects
> that send messages to it.

[..]

> Definition: In Object Oriented Programming, encapsulation is an
> attribute of object design. It means that all of the object's data is
> contained and hidden in the object and access to it restricted to
> members of that class.

Ahh, 'concealed', 'contained', 'hidden'. Except the last one, "hidden", python 
does the rest... and one could argue the self.__privs get pretty well hidden.

Not 'forbidden', 'restricted', 'enforced'.

-- 
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