Using property() to extend Tkinter classes but Tkinter classes are old-style classes?

Terry Reedy tjreedy at udel.edu
Sun Nov 28 18:15:28 EST 2010


On 11/28/2010 3:47 PM, python at bdurham.com wrote:
> I had planned on subclassing Tkinter.Toplevel() using property() to wrap
> access to properties like a window's title.
> After much head scratching and a peek at the Tkinter.py source, I
> realized that all Tkinter classes are old-style classes (even under
> Python 2.7).
> 1. Is there a technical reason why Tkinter classes are still old-style
> classes?

To not break old code. Being able to break code by upgrading all classes 
in the stdlib was one of the reasons for 3.x.

-- 
Terry Jan Reedy




More information about the Python-list mailing list