[Zope] Syntax

Paul Zwarts paz@oratrix.com
Thu, 12 Jul 2001 14:24:06 +0200


Hi Benoit,

AFAIK, the _ is used as a hack.

_ actually is the namespace variable, but in this case:

  REQUEST['var']   and    _[REQUEST['var']]

is no different. You use the _['something'] construction when a dash is used
in the name:

<dtml-var sequence-item> works by itself. If you want an expression of that:

<dtml-var "sequence-item-5"> does not work because it syubtracts item from
sequence and five from item. Instead use:

<dtml-var "_['sequence-item']-5">

It is a hack where _['a-b'] forces a-b transalated by zope as a_b so there
is not expression problem.

Did I miss anything, oh great zopemasters?


Cheers,
Paz



-----Original Message-----
From: zope-admin@zope.org [mailto:zope-admin@zope.org]On Behalf Of
Benoit DOMINIAK
Sent: Thursday, July 12, 2001 12:57 PM
To: zope@zope.org
Subject: [Zope] Syntax


Hi,

Do you know the difference between
  REQUEST['var']   and    _[REQUEST['var']]  ?

And also can you explain me what is this :  _

Thanks

_________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.


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