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 <rep...@bugs.python.org> <http://bugs.python.org/issue19020> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com