Adriano Monteiro a écrit : > Hey folks, > > I wanna know more about encapsulation in python. Is it fully suported? > How can I define the encapsulation statements for methods and attributes?
If you're thinking of things like private/protected/public: class Foo(object): def __init__(self): self.public = 'this is the API' self._protected = 'implementation detail' self.__private = 'keep out' BTW, you may want to have a look at this: http://c2.com/cgi/wiki?EncapsulationIsNotInformationHiding -- http://mail.python.org/mailman/listinfo/python-list