Edit: I know it's slightly off-topic.
Edit: I know it's slightly off-topic.
The idea then, is that larger teams can be divided into sub-teams, and work in parallel because the interfaces between components don't change, even if the internals change drastically. Essentially it allows components to be somewhat independent. How this works in practice tho...
Likewise, private members of a class are implementation details I may wish to change later -- but I would like some assurance that other components will be isolated from this change, so as not to break.
Edit-add: oh, I of course forgot to mention -- for those not familiar, python permits both :-)
There are some other uses and examples, but this is the simplest one i can think of off the top of my head.
Public/private access are used to specify an interface to arbitrary functionality. Other modules can call a public interface, but all private internals can be removed / modified freely.
Ideally, or at least for purity, all variables should be private and only accessible via get/set methods, thus encapsulation is enforced.