private

holger krekel pyth at devel.trillke.net
Mon Jul 1 04:54:38 EDT 2002


Bjorn Pettersen wrote:
> The OP asked about private vars/methods like C++. Above are three ways
> to get around private in C++ without recompiling the (possibly third
> party) C++ library you're #including. As you see, the private
> declaration in C++ is mostly informational. In Python we use _ or __
> prepended to var/method names to achieve the same effect. Python does
> have true private vars/methods through the Bastion module, but most
> Pythonistas don't see the purpose. After all, if you can't trust your
> developers you have bigger problems.

nicely put.  I'd apply this true axiom to security related stuff, also.
I mean, we don't even know anything about 99% of the code we are running.  
All the secret services people may have long put trojan horses into huge
amounts of free software.  Good enough peer review only happens with the
well known packages like apache/sendmail/python/...  For the other gazillion
software packages you have to trust the developers to be honest.  If
you can't trust your developers you have bigger problems.

    holger





More information about the Python-list mailing list