[Patches] [ python-Patches-518625 ] Return objects in Tkinter

noreply@sourceforge.net noreply@sourceforge.net
Tue, 26 Nov 2002 01:28:47 -0800


Patches item #518625, was opened at 2002-02-17 01:36
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=518625&group_id=5470

Category: Tkinter
Group: None
>Status: Closed
>Resolution: Accepted
Priority: 5
Submitted By: Martin v. Löwis (loewis)
Assigned to: Nobody/Anonymous (nobody)
Summary: Return objects in Tkinter

Initial Comment:
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.

----------------------------------------------------------------------

>Comment By: Martin v. Löwis (loewis)
Date: 2002-11-26 10:28

Message:
Logged In: YES 
user_id=21627

Since there were no further comments, committed as

Tkinter.py 1.166
NEWS 1.543
_tkinter.c 1.131


----------------------------------------------------------------------

Comment By: Guido van Rossum (gvanrossum)
Date: 2002-11-22 14:25

Message:
Logged In: YES 
user_id=6380

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.

----------------------------------------------------------------------

Comment By: Martin v. Löwis (loewis)
Date: 2002-11-22 14:20

Message:
Logged In: YES 
user_id=21627

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

----------------------------------------------------------------------

Comment By: Guido van Rossum (gvanrossum)
Date: 2002-11-22 13:10

Message:
Logged In: YES 
user_id=6380

Looks OK in theory.

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=518625&group_id=5470