Dieter Maurer wrote:
> Richard Jones writes:
>  > As the subject says, REQUEST.set('n', n+1) is broken on The
>  > following DTML will raise an AttributeError on __add__:
>  >
>  > <dtml-call REQUEST.set('n', 1)>
>  > <dtml-call REQUEST.set('n', n+1)>
> There may be a simple explanation
> (someone else already pointed out, that you need to use "...";
> I expect, you did as otherwise, you would get a "KeyError"):

    Yeah, sorry my example code was wrong.

>   There may be an object named "n" somewhere in the
>   acquisition context. An object that does not define
>   an "__add__" method.
> As you probably know (or can reread in the documentation),
> "REQUEST" has quite a low priority for lookups
> (in fact, it is at the bottom of the acquisition context).
> It is therefore easy to have a REQUEST definition overridden.
> Use "REQUEST['n']+1" instead of "n+1".

  This fixed the problem, thanks. I'm only just getting back into Zope,
and I suppose acquisition hadda bite me at least once :)


Richard Jones
Senior Software Developer, Bizar Software (

Zope maillist  -  [EMAIL PROTECTED]
**   No cross posts or HTML encoding!  **
(Related lists - )

Reply via email to