Encapsulation unpythonic?

Terry Reedy tjreedy at udel.edu
Sat Aug 17 17:22:38 EDT 2013


On 8/17/2013 11:50 AM, Chris Angelico wrote:
> On Sat, Aug 17, 2013 at 1:26 PM,  <fsaldan1 at gmail.com> wrote:
>> 2) If it is in fact true that encapsulation is rarely used, how do I deal with the fact that other programmers can easily alter the values of members of my classes?
>
>
> Very simply: You accept it. Let them! It's their responsibility.

When a project has multiple programmers, there is a possibility that 
module C could monkeypatch module A in a way that breaks existing user 
module B. But it is still the collective responsibility of the 
respective users or project manager to assign responsibility for fixing 
the conflict.

-- 
Terry Jan Reedy




More information about the Python-list mailing list