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

Charlie Reiman creiman@kefta.com
Thu, 23 Jan 2003 09:35:55 -0800


> -----Original Message-----
> From: zpt-admin@zope.org [mailto:zpt-admin@zope.org]On Behalf Of Casey
> Duncan
> Sent: Thursday, January 23, 2003 7:24 AM
> To: Shane Hathaway; Dieter Maurer
> Cc: Scott Burchill; Evan Simpson; zpt@zope.org; Richard Jones
> Subject: Re: [ZPT] Mini proposal: repeat-define and repeat-condition
>
>
> On Tuesday 21 January 2003 09:16 pm, Shane Hathaway wrote:
> > Evan Simpson wrote:
> >
> > >  > > 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__".
> >
> > +1 from me.  It's better than my proposal.
>
> Here's a counter-proposal that I think might combine both of
> yours and solve
> the backward compatibility issue:
>
> Invent a new repeat tag that happens first and leave the existing
> repeat tag
> alone.
>
> This tag would not be understood by older TAL processors, but it
> would not
> break any existing page templates or harm those blissfully
> ignorant of the
> change.
>
> Something like:
>
> <div tal:pre-repeat="item here/foo" tal:define="ob item/getObject">


What would:

<div tal:pre-repeat="item here/foo" tal:repeat="another here/bar">

do?

Honestly, I think it's too late to make any of these proposed changes. It's
already shipped and there's a reasonable workaround. Yeah, you have to
insert a nested tag... so cry me a river. Compared to the possible upheaval,
complexity increase, or performance hit, none of the existing proposals
strike me as a good idea.

ZPT newbie,

Charlie.