Using property() to extend Tkinter classes but Tkinter classes are old-style classes?
hansmu at xs4all.nl
Tue Nov 30 19:01:05 CET 2010
Giacomo Boffi wrote:
> Terry Reedy <tjreedy at udel.edu> writes:
>> 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
>> 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.
> In 3.x, are Tkinter classes still derived by old-style classes?
3.x does not provide old-style classes.
Oh, and the name Tkinter was changed to tkinter: all modules in the
standard library have lower case names in 3.x.
More information about the Python-list