[Zope] re: Length of results set

Dylan Reinhardt Dylan@DylanReinhardt.com
Thu, 16 Jan 2003 12:58:19 -0800


At 12:33 PM 1/16/2003, Ken wrote:

> > Does *that* do it?
>
>Yes! Well, almost: it had to be
><dtml-call "REQUEST['my_langs'].append(langShort)"> etc
>for some reason...

Odd... can't imagine why *that* would be.  Once you've stuffed 'my_langs' 
in the REQUEST, it should be easy enough to find.

I just verified the following (v. 2.5.1):

<dtml-call "REQUEST.set('my_source', [1,2,3,4])">
<dtml-call "REQUEST.set('my_target', [])">
<dtml-in my_source prefix="source">
   <dtml-call "my_target.append(source_item)">
</dtml-in>
<dtml-var "_.len(my_target)"> : <dtml-var my_target>

which returns 4 : [1, 2, 3, 4] as expected.

REQUEST shouldn't normally be required to use append()... but hey, if it 
works, who cares, right?  :-)

Dylan