[issue19020] Regression: Windows-tkinter-idle, unicode, and 0xxx filename

Serhiy Storchaka report at bugs.python.org
Sun Sep 15 11:24:17 CEST 2013


Serhiy Storchaka added the comment:

There are two methods: splitlist() and split(). The splitlist() method splits only one level and always returns a tuple (even if it is empty or one-element). The split() method splits recursive and can returns a string if it is not splittable. I.e. result type of split() depends on if the argument contains spaces.

Before issue18101 split() was broken on Python 3. It splitted recursively only bytes objects but not unicode strings. After "fixing" it becomes split already parsed tuples of strings.

Perhaps split() shouldn't recursive parse tuples. But in this case its purpose is questionable. Recursive parse only string argument? But how it can distinguish the list of two strings "a" and "b c" from the list of the "a" string and the ["b", "c"] list? Both are spelled as {a {b c}} in Tcl.

The proposed patch gets rid from split() in the configure result parsing code and uses two-level splitline() instead. Perhaps we should replace all left split()-s to the appropriate number of splitline()-s.

----------
assignee:  -> serhiy.storchaka
components: +IDLE, Tkinter
keywords: +patch
nosy: +gpolo
stage: needs patch -> patch review
Added file: http://bugs.python.org/file31766/tkinter_configure_splitlist.patch

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue19020>
_______________________________________


More information about the Python-bugs-list mailing list