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 2013-09-16.08:47:31
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
Currently the repr() for Tcl_Obj is not very useful. It exposes only Tcl type name and Tcl object address.

>>> import tkinter.ttk
>>> tv = tkinter.ttk.Treeview()
>>> tv.tag_configure('test', foreground='blue')
>>> str(tv.tag_configure('test', 'foreground'))
>>> tv.tag_configure('test', 'foreground')
<color object at 0xb70f84b8>

You need explicitly call str to get more useful information. This is awkward when Tcl object hidden deeply in tuples or other data structure, or reported in a backtrace. Actually every Tcl object can be represented as a string. I propose to expose this representation in repr(). With proposed patch the output of the last command will be: <color object: 'blue'>.
Date User Action Args
2013-09-16 08:47:32serhiy.storchakasetrecipients: + serhiy.storchaka, terry.reedy, gpolo
2013-09-16 08:47:32serhiy.storchakasetmessageid: <>
2013-09-16 08:47:32serhiy.storchakalinkissue19034 messages
2013-09-16 08:47:31serhiy.storchakacreate