[Zope] Re: tal:repeat usage

Evan Simpson evan@4-am.com
Tue, 05 Nov 2002 15:02:20 -0600


Andrew Athan wrote:
> This, unfortunately, does not work.  It yields the error "global name 'a' is
> not defined"
> 
> The issue is that dictionary keys do not seem to be traversible as
> attributes.

I just tried it, and it worked fine for me.  If I use "v/blah" instead, 
I get a KeyError; I can't replicate your "global name..." error.  Here's 
the whole thing:

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

Cheers,

Evan @ 4-am