private

Dave Reed dreed at capital.edu
Sat Jun 29 22:21:41 CEST 2002


> From: Peter Hansen <peter at engcorp.com>
> X-Accept-Language: en
> Newsgroups: comp.lang.python
> Xref: news.baymountain.net comp.lang.python:170296
> Sender: python-list-admin at python.org
> Date: Sat, 29 Jun 2002 12:32:50 -0400
> 
> Rhymes wrote:
> > 
> > Is there any possibility to build up a _real_ private attribute?
> 
> Please define what "_real_" means to you.  It's not apparent.
> 
> > Such as C++ private data members...
> 
> You realize that it's quite possible to get at private data members
> in C++, don't you?

Kind of off-topic, but this got me curious. The only way I could think
of is to assume (which I think is always true) that the private data
members are in order from the starting address so based on the offset
from the address of the object you could access each one.

Is there another way?

Dave





More information about the Python-list mailing list