classification
Title: Accept lists in Tkinter
Type: enhancement Stage: resolved
Components: Tkinter Versions: Python 3.5
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: serhiy.storchaka Nosy List: gpolo, loewis, python-dev, serhiy.storchaka, terry.reedy
Priority: normal Keywords: patch

Created on 2014-05-18 16:04 by serhiy.storchaka, last changed 2014-05-21 14:21 by serhiy.storchaka. This issue is now closed.

Files
File name Uploaded Description Edit
tkinter_accept_lists.patch serhiy.storchaka, 2014-05-18 16:04 review
Messages (3)
msg218747 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2014-05-18 16:04
There is very common error when user pass list instead tuple to Tkinter. Some functions accept both tuple and list, some functions reject list, but many functions silently convert non-tuple value to str (e.g. [1, 2] -> '[1, 2]' instead of expected Tcl representation '{1 2}'). The proposed patch adds support of Python lists in all Tkinter functions which accept tuples.
msg218768 - (view) Author: Terry J. Reedy (terry.reedy) * (Python committer) Date: 2014-05-18 23:43
Sounds like a good idea to me. The code looks pretty straightforward as far as I understood it.
msg218875 - (view) Author: Roundup Robot (python-dev) Date: 2014-05-21 14:12
New changeset 8676e436c0f0 by Serhiy Storchaka in branch 'default':
Issue #21525: Most Tkinter methods which accepted tuples now accept lists too.
http://hg.python.org/cpython/rev/8676e436c0f0
History
Date User Action Args
2014-05-21 14:21:46serhiy.storchakasetstatus: open -> closed
resolution: fixed
stage: patch review -> resolved
2014-05-21 14:12:32python-devsetnosy: + python-dev
messages: + msg218875
2014-05-18 23:43:57terry.reedysetmessages: + msg218768
2014-05-18 16:04:31serhiy.storchakacreate