is python Object oriented??

Thorsten Kampe thorsten at thorstenkampe.de
Wed Feb 4 05:14:55 EST 2009


* Russ P. (Tue, 3 Feb 2009 21:04:30 -0800 (PST))
> Imagine you own a company, and you decide to lease an office building.
> Would you expect the office doors to have locks on them? Oh, you
> would? Why? You mean you don't "trust" your co-workers? What are locks
> but enforced access restriction?
> 
> What people like you are saying is that you don't need no stinkin'
> locks because your co-workers are all "consenting adults" whom you
> trust. Actually, you're saying even more than that. You're saying that
> office doors never need locks, because everyone should trust their co-
> workers. All you need is a "keep-out" sign on the door (leading
> underscores). And you are presenting as evidence for your position the
> fact that people occasionally get locked out of an office that they
> need to get into.
> 
> I'm saying, fine, if you trust your co-workers, then keep the doors
> unlocked, but please don't insist that office doors come without
> locks. Yes, locks occasionally cause inconvenience, but they serve a
> very useful purpose if used properly.

This analogy is not adequate. If someone uses your library then it is 
his office and nothing can stop him. Someone else gave a better analogy 
with a device that says that the warranty is lost if you open it. And 
that's exactly the same with the underscore convention.

Thorsten



More information about the Python-list mailing list