On 9/29/05, could ildg <[EMAIL PROTECTED]> wrote:
> **Encapsulation** is one of the 3 basic characteristics of OOP.

Pyhton has encapsulation. On objetcts members are encapsulated in a
namespace all of its own. You can't change these by accident.

> Every programmer is  just a human being, but not God. Our life is limited,
> our time is limited, so we need to use convenient tools to save time.
> Private variables guarantee that we will never make stupid mistakes

Private variables prevent the developer of the *client* of a class
from making a small subset of all possible stupid mistakes. But if the
developer of the classitself is mistaken in marking a variable as
private, and if the language enforces this, then there is nothing at
all that the client can do to fix it. Why should the developer of the
class be more likely to be god-like than the user of the class? This
has happened to me more than once.

--
Cheers,
Simon B,
[EMAIL PROTECTED],
http://www.brunningonline.net/simon/blog/
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to