[Zope] Questions re: REQUEST, external methods; newbie stupidity at play

Bryan White zoper@disturbance.dhs.org
Wed, 16 Jul 2003 10:43:12 -0700


OK, well your answer also touches on another issue that I sent to the 
list a few days previously - 'Freeing ZSQL Result Sets'. Essentially, I 
have a loop in which I need to use the same SQL queries repeatedly with 
different values in the where clause. I end up having to have several 
exact duplicate ZSQL: queries with different names in order to avoid 
problems.

So, though I think Dylan has answered this question as "no" in the 
response below, I simplify my question to:

Can you / how does one destroy variables / objects in DTML?

Bryan

Dylan Reinhardt wrote:

>Here's what you're trying to do:
>
><dtml-call "REQUEST.set('some_var', some_function())">
><dtml-call "REQUEST.set('some_var', some_other_function(some_var))">
>
>That's not going to work.  Unlike Python, DTML doesn't seem to like
>using a variable in an expression whose output is stored in the same
>variable.  Maybe somebody smarter could offer an explanation why not.
>
>Anyway... what you want to do is:
>
><dtml-call "REQUEST.set('some_var', some_function())">
><dtml-call "REQUEST.set('some_temp', some_var)">
><dtml-call "REQUEST.set('some_var', some_other_function(some_temp))">
>
>
>Sad but true... unless there's a better workaround I don't know about.
>
>  
>