Why does python not have a mechanism for data hiding?

Antoon Pardon apardon at forel.vub.ac.be
Tue Jun 3 07:30:53 EDT 2008


On 2008-06-03, George Sakkis <george.sakkis at gmail.com> wrote:
> On Jun 3, 1:42 am, "Russ P." <Russ.Paie... at gmail.com> wrote:
>> On Jun 2, 10:23 pm, alex23 <wuwe... at gmail.com> wrote:
>>
>> > Then again, I have no issue with the current convention and personally
>> > find the idea of adding a "private" keyword makes as much sense as
>> > being able to syntactically define "model", "view" and "controller"
>> > methods.
>>
>> Well, the designers of C++, Java, and Ada, to name just three very
>> popular languages (well, two) seem to think it makes sense. But maybe
>> you know more than they know.
>
> And even more (well, almost all) languages use explicit delimiters for
> defining blocks instead of indentation, so what's your point ?

Hmm, difficult to react to this. On the one hand I have had people
argue that block delimiting in python is explicit too. So in that
case python doesn't differ from those other languages.

On the other hand if we accept that blocks are delimited implicitely
in python then it seems python doesn't follow its own zen:

  Explicit is better than implicit

-- 
Antoon Pardon



More information about the Python-list mailing list