On 11/30/10 11:00 AM, Giacomo Boffi wrote:
Terry Reedy<tjre...@udel.edu>  writes:

On 11/28/2010 3:47 PM, pyt...@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.

In 3.x, are Tkinter classes still derived by old-style classes?

No.

[~]$ python3
Python 3.1.2 (r312:79360M, Mar 24 2010, 01:33:18)
[GCC 4.0.1 (Apple Inc. build 5493)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import tkinter
>>> tkinter.Tk.mro()
[<class 'tkinter.Tk'>, <class 'tkinter.Misc'>, <class 'tkinter.Wm'>, <class 'object'>]
>>>

--
Robert Kern

"I have come to believe that the whole world is an enigma, a harmless enigma
 that is made terrible by our own mad attempt to interpret it as though it had
 an underlying truth."
  -- Umberto Eco

--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to