On 2007-11-17, Odalrick <[EMAIL PROTECTED]> wrote: >> But that breaks expectations: a user doesn't expect >> set_width() to affect the height. > > I can't speak for everyone but I certainly expect setting the > width of a Square to change it's height. In fact, that would > probably be the reason I used a Square rather than a Rectangle > in the first place.
Some of the dissonance is from assuming that rectangles can mutate themselves. I've never seen one do that! ;) The rest of the dissonance is caused by strong typing. A rectangle with equal width and height is still a rectangle, in a strongly typed language. -- Neil cerutti -- http://mail.python.org/mailman/listinfo/python-list