Will python never intend to support private, protected and public?

Paul Rubin http
Thu Sep 29 07:22:14 EDT 2005


Gregor Horvath <g.horvath at gmx.at> writes:
> Everything is said on this topic. There are two ligitimate solutions
> to the problem of private instance variables. Its a matter of taste,
> and mine is the pythonic one.

The Pythonic solution is to have both solutions available, and Python
in fact used to have both (name mangling and the Bastion class).  But
Bastion turned out not to work, and it's not easy to fix that under
CPython, so it was removed.  Now the Bastion class is gone, and only
name mangling is left.  Maybe Bastion can come back under Pypy.



More information about the Python-list mailing list