New submission from Serhiy Storchaka:

Proposed patch replaces errorprone uses of tkapp.split() to tkapp.splitlist().

* Variable.trace_vinfo(). Actually there are no difference between split() and 
splitlist(), because "trace vinfo" always returns a list of 2-element tuple of 
strings and none of these can't contain spaces, '\\', or '{' (at least this 
can't be created from Tkinter).

* Misc.winfo_visualsavailable() already has a workaround for split() 
peculiarity. With splitlist() the code is more straightforward.

* tix.ListNoteBook.pages() and tix.NoteBook.pages() with split() can fail when 
there is only one page or when page names contain spaces or special characters.

* tix.CheckList.getselection() already has a workaround for split() 
peculiarity. It calls splitlist() for result of split(). split() call is 
redundant.

* In tix.Grid.size_column() and tix.Grid.size_row() there are no significant 
differences in behavior between split() and splitlist().

After these changes tkapp.split() no longer be used in the stdlib and can be 
deprecated.

----------
components: Library (Lib), Tkinter
files: tkinter_use_splitlist.patch
keywords: patch
messages: 208831
nosy: gpolo, serhiy.storchaka, terry.reedy
priority: normal
severity: normal
stage: patch review
status: open
title: Replace tkapp.split() to tkapp.splitlist()
type: behavior
versions: Python 2.7, Python 3.3, Python 3.4
Added file: http://bugs.python.org/file33628/tkinter_use_splitlist.patch

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue20350>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to