On Sat, 22 Dec 2007 07:21:26 -0800, [EMAIL PROTECTED] wrote:
> Steven D'Aprano,
>
> On Dec 21, 2:08 am, Steven D'Aprano
> <[EMAIL PROTECTED]> wrote:
>> On Thu, 20 Dec 2007 20:27:23 -0800, [EMAIL PROTECTED] wrote:
>> > Stef,
>>
>> > For clarification, there is nothing hazardous about using eval on the
>> > string that you presented.
>>
>> > t = eval('(0, 0, 0, 255), (192, 192, 192, 255), True, 8')
>>
>> > Whether or not this is the "simplest" solution, remains a question.
>>
>> For clarification, if all the poster wanted was to convert the
>> *specific* *known* string to a tuple, he would be better off just
>> writing it as a tuple:
>
> Steven,
>
> No, that's not what he asked. Read the original question.
I did. I even read all the way down to the part where he wrote:
"(Not needed now, but might need it in the future: even deeper nested
lists, represented by a string.)"
Its clear that the OP has more in mind than just a single specific known
string.
--
Steven
--
http://mail.python.org/mailman/listinfo/python-list