[Zope] tal:repeat usage

Andrew Athan zope_list_replies@memeplex.com
Tue, 5 Nov 2002 14:04:49 -0500


<span tal:define="global foo python:[{'a':1},{'a':2}]"></span>

<span tal:repeat="v foo">
  <span tal:content="repeat/v/a"></span>
</span>


The code above doesn't work.  Instead, I have to replace the content= with
"python:foo[repeat['v'].index]['a']"

Seems silly and cumbersome.  Am I doing something stupid here (like
forgetting the python syntax for creating objects on the fly so I can use a
list of objects instead of a list of dictionaries)?  Argh.  Going back and
forth between JavaScript, Python, Perl and Java is killing me.

aathan <Andrew Athan>