Inheritance error in python 2.3.4???
Paul Rubin
http
Mon Feb 14 18:50:45 EST 2005
"friedmud at gmail.com" <friedmud at gmail.com> writes:
> The problem is that I actually do need them to be private to the
> outside world... but not to subclasses. I guess what I actually need
> is something like "protected" in C++.... but I don't think I'm going to
> get that luxury.
The only way to make instance variables really private is to put them
in a separate process and use IPC to reach the accessors. The __xyz
convention results in deterministic name mangling that other parts of
the program can undo if they wish to.
More information about the Python-list
mailing list