Will python never intend to support private, protected and public?
Fri Sep 30 06:48:42 CEST 2005
"Fredrik Lundh" <fredrik at pythonware.com> writes:
> > Looks like you must know every one of the base classes of the NotSoSecret,
> > whether there is some base class named Secret? And, if so, you must also
> > know these classes _implementation_
> that information isn't hidden, so there's nothing "you must know".
> finding out is a matter of writing a very small program, or
> tinkering at the interactive prompt for a couple of seconds. are
> you even aware that you're posting to a Python group ?
No. You could poke at the implementation interactively to find out
that some __xyz attribute isn't in use by some superclass, then you
could write your code to use that attribute, and later the
superclasses change out from under you so that the name mangling fails
to protect you.
More information about the Python-list