Why does python not have a mechanism for data hiding?

Antoon Pardon apardon at forel.vub.ac.be
Thu Jun 5 04:21:41 EDT 2008


On 2008-06-04, Marc 'BlackJack' Rintsch <bj_666 at gmx.net> wrote:
> On Wed, 04 Jun 2008 09:34:58 +0000, Antoon Pardon wrote:
>
>> On 2008-06-04, Marc 'BlackJack' Rintsch <bj_666 at gmx.net> wrote:
>> 
>>>>> it makes sense to me to also test if they work as documented.
>>>> 
>>>> If they affect the behaviour of some public component, that's where
>>>> the documentation should be.
>>>
>>> As I said they are public themselves for someone.
>> 
>> Isn't that contradictory: "Public for someone" I always
>> thought "public" meant accessible to virtually anyone.
>> Not to only someone.
>
> For the programmer who writes or uses the private API it isn't really
> "private", he must document it or know how it works.

How does that make it not private. Private has never meant "accessible
to noone". And sure he must document it and know how it works. But that
documentation can remain private, limited to the developers of the
product. It doesn't have to be publicly documented.

-- 
Antoon Pardon



More information about the Python-list mailing list