[ZPT] Re: Mini proposal: repeat-define and repeat-condition

Evan Simpson evan@4-am.com
Mon, 20 Jan 2003 17:47:12 -0600


Richard Jones wrote:
> This issue has come up before (ie. about a year and a half ago :). Does anyone 
> recall where the conversation ended?

I had propsed changing the order of operations from "define, condition, 
repeat, etc." to "repeat, define, condition, etc.", and using a 
processing instruction in a similar fashion to Python's "import from 
__future__".

The rationale was that given an element like this:

<foo tal:define="..." tal:condition="..." tal:repeat="..." />

it is possible (and often acceptable) to get the current behavior by 
rewriting like so:

<div tal:define="..." tal:condition="...">
   <foo tal:repeat="..." />
</div>

...while the obverse is often unacceptable:

<div tal:repeat="...">
   <foo tal:define="..." tal:condition="..." />
</div>

...at least without using TAL namespaced tags.  Also, it's a lot easier 
to remember that everything repeats, rather than everthing *except* 
define and condition.

Cheers,

Evan @ 4-am