[Zope] How does Zope and Python work?
Chris McDonough
chrism@digicool.com
Thu, 02 Aug 2001 20:35:38 -0400
Peter Bengtsson wrote:
>
> Consider:
>
> <dtml-in select_zsqlmethod_sql>
> <dtml-var foo>
> </dtml-in>
> <dtml-in select_zsqlmethod_sql>
> <dtml-var bar>
> </dtml-in>
>
> 2 process calls to select_zsqlmethod_sql()
Yes.
> <dtml-let sequence=select_zsqlmethod_sql>
> <dtml-in sequence>
> <dtml-var foo>
> </dtml-in>
> <dtml-in sequence>
> <dtml-var bar>
> </dtml-in>
> </dtml-let>
>
> 1 process call, isn't it??
Yes..
> Is it different for calls to other sequence returning things? like
> objectValues() or getResultScript() or whatever.
No...
> I just want to use garbage collection instead of to many calls to other
> objects around.
I'm not sure what garbage collection you're referring to, but making
calls to things that return sequences and storing their results in a
local variable (via dmtl-let) puts the sequence in memory for the
duration of the let.
--
Chris McDonough Zope Corporation
http://www.zope.org http://www.zope.com
"Killing hundreds of birds with thousands of stones"