On 17 August 2013 17:17, Steven D'Aprano <steve+comp.lang.pyt...@pearwood.info> wrote: > On Sat, 17 Aug 2013 05:26:32 -0700, fsaldan1 wrote: >> how do I >> deal with the fact that other programmers can easily alter the values of >> members of my classes? > ... > If they insist on messing with your private single-underscore > _attributes, you can't stop them, but that's okay, you don't have to be > sympathetic when they shoot their foot off. Just slap them with a large > halibut[1] and laugh.
I know I've cropped your points but I just want to mention here that the only reason to monkey-patch code in these ways where you'd want to stop them is when the alternative is *worse*. It's like removing railings from a cliff to stop people hitting the bars. -- http://mail.python.org/mailman/listinfo/python-list