[Zope] NameError problem with sequence-number

zbir@urbanape.com zbir@urbanape.com
Fri, 06 Jul 2001 10:45:40 -0400


> Hello,
> 
> I can run the following code which runs fine:
> 
> <dtml-in "_.range(0,5)">
>   <dtml-var sequence-number>
> </dtml-in>
> 
> However adding quotes around sequence-number always gives me an 
> error "Error Type: NameError  Error Value: sequence".
> 
> <dtml-in "_.range(0,5)">
>   <dtml-var "sequence-number">
> </dtml-in>

<dtml-in "_.range(0,5)">
  <dtml-var expr="_['sequence-number']">
</dtml-in>

Or use Tino's underscore patch ( which changes the -'s to _'s ).

The problem is inside an expr, it's trying to evaluate 'sequence' minus
'number', and is failing to find 'sequence'.

me = { 'name' : 'Zachery Bir', 'email' : 'zbir@urbanape.com',
       'voice' : '(804) 353-3742', 'url' : 'http://www.urbanape.com/' }