Tkinter callback arguments

Alf P. Steinbach alfps at start.no
Wed Nov 4 16:08:49 EST 2009


* Terry Reedy:
> Alf P. Steinbach wrote:
> 
>> However, the natural semantics is that various logical properties, 
>> such as left, top, right, bottom, width and height, can be varied 
>> independently.
> 
> But they *CANNOT* be varied independently. A rectangle with side 
> parallel to the axes has exactly 4 degress of freedom, not 6.

Yes <g>. That's the basic idea of the example I presented up-thread, that's 
discussed here. With R1's state variables width and heigh can be varied 
independently by direct modification, with R2 it's right and bottom.

The public interface must also make this choice, but it's an independent choice: 
the internal rectangle representation can have the opposite choice.

And conversely, that means that if the internal representation isn't used 
directly, then it can be changed without affecting the public interface.


Cheers,

- Alf



More information about the Python-list mailing list