Author serhiy.storchaka
Recipients serhiy.storchaka, terry.reedy
Date 2016-01-23.09:33:43
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
> Is avoiding splitlist calls when not needed worthwhile?

We can't guarantee that future release of Tk wouldn't return a list of strings. Calling splitlist() for a tuple is cheap (but looks cumbersome).

> I am a bit curious why Canvas gives a different return.  Is the special casing in _tkinter or tk itself?

Tk is full of such inconsistencies. A result for one widget can be a list of numbers, but for other it is a list of strings or a list of special Tcl objects. One method can return empty list, other returns empty string. One widgets truncate floating point parameters, others round them up or down.

I'll commit the patch after testing with Tk 8.5 and 8.4.
Date User Action Args
2016-01-23 09:33:44serhiy.storchakasetrecipients: + serhiy.storchaka, terry.reedy
2016-01-23 09:33:44serhiy.storchakasetmessageid: <>
2016-01-23 09:33:44serhiy.storchakalinkissue26177 messages
2016-01-23 09:33:43serhiy.storchakacreate