----- Original Message ----- From: <[EMAIL PROTECTED]>
To: <zope@zope.org>
Sent: Tuesday, October 24, 2006 1:04 PM
Subject: Re: [Zope] DTML Call Fails


Hi Tino.  Yes, that is correct. This application has variables named
like:

'AR-DA-08'

This also fails in a Page Template:

<span tal:define="standards python: request.SESSION">
  <tal:block define="temp python: data.set('AR-DA-08',AR-DA-
08)"></tal:block>
</span>

With the error:

Compilation failed
TAL.TALDefs.TALError: Python expression error:
invalid token (Python expression "data.set('AR-DA-08',AR-DA-08)",
line 1) in expression "python: data.set('AR

Yet this works:

<span tal:define="standards python: request.SESSION">
  <tal:block define="temp python: data.set('AR-DA-07',AR-DA-
07)"></tal:block>
</span>

So you are saying the interpreter is seeing the '-' as a minus? Why
would it work in one case and not the other?


Two possibilities that I can think of:

1) you have a variable called AR-DA-08 and do not have a variable called AR-DA-07

2) you have a variable called AR (and possibly another variable called DA), which when evaluated as a mathematical expression (AR minus DA - 08) provides a result, but when 07 is subtracted, an invalid result is obtained.

But, as others have noted, this does not appear to be what you are looking to accomplish!


Jonathan


_______________________________________________
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - http://mail.zope.org/mailman/listinfo/zope-announce
http://mail.zope.org/mailman/listinfo/zope-dev )

Reply via email to