Paul Rubin <http://[EMAIL PROTECTED]> writes: > OTOH, "private" lets you say 100% for certain that another class > didn't clobber __xyz, and that any bug that clobbered it MUST reside > in the class that declared it. That makes auditing for __xyz-related > errors a lot simpler since you only have to look in one class for them.
Horse pucky. >>> class Fools(object): ... _bar = "my private list of values".split() ... def broken(self, breaker): ... breaker(self._bar) ... >>> class Kings(object): [Elided, because you said you don't need it.] >>> fool = Fools() >>> king = Kings() >>> fool.broken(king.get_victim) >>> king.breakit() >>> fool._bar [] >>> So, fool._bar is now clobbered. Nuts, the _bar attribute is broken for *every* instance of Fools. According to you, the error must be in Fools. Care to point it out? <mike -- Mike Meyer <[EMAIL PROTECTED]> http://www.mired.org/home/mwm/ Independent WWW/Perforce/FreeBSD/Unix consultant, email for more information. -- http://mail.python.org/mailman/listinfo/python-list