This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author serhiy.storchaka
Recipients bsherwood, ezio.melotti, gpolo, serhiy.storchaka, terry.reedy, vstinner
Date 2013-09-15.09:24:15
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1379237057.84.0.607640381987.issue19020@psf.upfronthosting.co.za>
In-reply-to
Content
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.
History
Date User Action Args
2013-09-15 09:24:17serhiy.storchakasetrecipients: + serhiy.storchaka, terry.reedy, bsherwood, vstinner, gpolo, ezio.melotti
2013-09-15 09:24:17serhiy.storchakasetmessageid: <1379237057.84.0.607640381987.issue19020@psf.upfronthosting.co.za>
2013-09-15 09:24:17serhiy.storchakalinkissue19020 messages
2013-09-15 09:24:17serhiy.storchakacreate