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.

Title: Return objects in Tkinter
Type: Stage:
Components: Tkinter Versions:
Status: closed Resolution: accepted
Dependencies: Superseder:
Assigned To: Nosy List: gvanrossum, jackjansen, loewis
Priority: normal Keywords: patch

Created on 2002-02-17 00:36 by loewis, last changed 2022-04-10 16:05 by admin. This issue is now closed.

File name Uploaded Description Edit
tkinter.diff loewis, 2002-11-22 09:00
Messages (6)
msg39006 - (view) Author: Martin v. Löwis (loewis) * (Python committer) Date: 2002-02-17 00:36
This patch uses the Tcl object API to convert return
values to Python objects. For boolean, bytearray,
double, int, list, and string objects, the equivalent
Python objects are constructed (Unicode for Tcl
string). For untyped objects, strings are returned. For
all other objects, a Python wrapper object is returned
which supports a tp_str conversion.
msg39007 - (view) Author: Guido van Rossum (gvanrossum) * (Python committer) Date: 2002-11-22 12:10
Logged In: YES 

Looks OK in theory.
msg39008 - (view) Author: Martin v. Löwis (loewis) * (Python committer) Date: 2002-11-22 13:20
Logged In: YES 

I was originally asked to put this on SF for review because
the potential backwards incompatibility in return types.
IDLE seems to work fine with this change, so I expect
incompatibility to come up rarely.

Can I commit this as-is, with the suggestion that
applications that break with this can do

import Tkinter
Tkinter.want_objects = 0
msg39009 - (view) Author: Guido van Rossum (gvanrossum) * (Python committer) Date: 2002-11-22 13:25
Logged In: YES 

I can't answer that question, since I don't know what's out
in the field. If you don't get response from python-dev,
let's try this and see how it fares during the alpha tests.
msg39010 - (view) Author: Martin v. Löwis (loewis) * (Python committer) Date: 2002-11-26 09:28
Logged In: YES 

Since there were no further comments, committed as 1.166
NEWS 1.543
_tkinter.c 1.131
msg39011 - (view) Author: Jack Jansen (jackjansen) * (Python committer) Date: 2003-05-19 13:29
Logged In: YES 

According to some of the Tcl/Tk folks there is a problem with this patch, in 
that Tcl objects really *are* strings, and any typing is purely an 
implementation speedup shortcut. This showed up when Tkinter got a 
floating point value for tcl_version on MacOSX. Details are in bug report 

I'm adding this comment purely to make sure this bit of knowledge doesn't 
get lost.
Date User Action Args
2022-04-10 16:05:00adminsetgithub: 36111
2002-02-17 00:36:19loewiscreate