Quoting "Russ P." <russ.paie...@gmail.com>: > In the circle example, properties are nice for guaranteeing > consistency between the radius and the area, but they are not of much > use if you decide later that the client should not be allowed to > change either one. Well... I suppose you could define the setter to do > nothing ... but you had better figure a way to notify the client about > it.
Well, you could make it raise an exception. There was one C#1.0 class that did this, Liskov substitution principle be damned (it was for a subtype). Very frustrating. Once you decide for a public interface, you shouldn't change it... But, if you absolutely have to do it, complain loudly and as soon as possible. In python, I'd say that [a subclass of?] AttributeError would be the best solution for this ill-advised situation. -- Luis Zarrabeitia Facultad de Matemática y Computación, UH http://profesores.matcom.uh.cu/~kyrie -- http://mail.python.org/mailman/listinfo/python-list