private variables/methods

Peter Hansen peter at engcorp.com
Thu Oct 9 09:28:21 EDT 2003


gabor wrote:
> 
> On Thu, 2003-10-09 at 10:12, Dave Benjamin wrote:
> > In article <mailman.1065685337.1770.python-list at python.org>, gabor wrote:
> > > as far as i know in python there aren't any private (i mean not accessible
> > > from the outside of the object) methods/fields.
> > >
> > > why?
> >
> > No offense, but this is like the 4000th time someone has asked that question
> > here. Could you try searching Google groups first?
> 
> you're right, i'm sorry.
> 
> after reading the archives:
> 
> i think i didn't express myself too well.
> i'll try again:

Don't bother.  You perhaps didn't really read enough of the archives,
because Dave's point still stands.  None of your questions or comments, 
as far as I can tell, ask or say anything that hasn't already been
asked (and answered) or said before.

In summary: it's more of a philosophical difference than anything, and
Python simply doesn't *want* a "private" keyword, nor things like that
which artificially restrict the programmer.  (Again, even that comment
adds nothing new, so you're really wasting your and our time by responding
rather than continuing to read the zillion old threads on the topic.)

-Peter




More information about the Python-list mailing list