Encapsulation unpythonic?

Roy Smith roy at panix.com
Sun Sep 1 15:13:06 EDT 2013


In article <mailman.455.1378062400.19984.python-list at python.org>,
 Ethan Furman <ethan at stoneleaf.us> wrote:

> On 09/01/2013 03:09 AM, Fabrice Pombet wrote:
> >
> > So I guess that we are actually all agreeing on this one.
> 
> No, we are not.
> 
> "encapsulation" != "inaccessible except by getters/setters"

Nothing is accessible in Python except via getters and setters.  The 
only difference between Python and, say, C++ in this regard is that the 
Python compiler writes them for you most of the time and doesn't make 
you put ()'s at the end of the name :-)



More information about the Python-list mailing list