[Zope] CoreSessionTracking and lists
Jim Washington
jwashin@vt.edu
Tue, 31 Jul 2001 08:42:37 -0400
Milos Prudek wrote:
>I would like to assign a list to a variable in CoreSessionTracking.
>
>This fails:
><dtml-call "data.set('varname',"["1"]")>
>
>But in python, I can do an assignment a=["1"]
>
>I tried to play around with single and double quotes, but to no avail.
>
>What am I failing to understand?
>
Milos,
<dtml-call "data.set('varname',['1'])">
should work.
I am guessing you got stumped by the syntax error in your first try.
You needed a double quote to complete the data.set() expression :
"data.set(blah)". But you did not need the double quotes around the
second parameter, because you were already inside a python expression.
And since the expression is already inside double quotes, you need to
delimit strings with single quotes. If you need more, use a python script.
hth,
-- Jim Washington