This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author serhiy.storchaka
Recipients gpolo, serhiy.storchaka, terry.reedy
Date 2014-08-17.14:24:07
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
Currently Tkinter supports two modes:

* When wantobjects=1 (default), all results of Tcl/Tk commands are converted to appropriate Python objects (int, float, str, bytes, tuple) if it is possible or to Tcl_Obj for unknown Tcl types.
* When wantobjects=0 (legacy mode), all results of Tcl/Tk commands are converted to strings.

But arguments of a callback are always converted to str, even when wantobjects=1. This can lost information ("42" is not distinguished from 42 or (42,)) and may be less efficient. Unfortunately we can't just change Tkinter to pass callback arguments as Python objects, this is backward incompatible change. Proposed patch introduces third mode wantobjects=2. It is the same as wantobjects=1, but callbacks now received . Default mode is still wantobjects=1, it can be changed in future. But in Tkinter applications (IDLE, Turtledemo, Pynche) we can use wantobjects=2 right now.

The only problem left is documenting it. The wantobjects parameter is not documented at all except an entry in "What's New in Python 2.3". Does anyone want to document this feature?
Date User Action Args
2014-08-17 14:24:09serhiy.storchakasetrecipients: + serhiy.storchaka, terry.reedy, gpolo
2014-08-17 14:24:09serhiy.storchakasetmessageid: <>
2014-08-17 14:24:09serhiy.storchakalinkissue22214 messages
2014-08-17 14:24:08serhiy.storchakacreate