[ZPT] Deafening chirping of crickets
fmartins at hetnet.nl
Tue Apr 22 21:35:52 EDT 2003
Chris Withers wrote:
> Fernando Martins wrote:
> > Chris Withers wrote:
> >>I've never encountered this as a pointof irritation.
> >>The order of execution of statements, yes, building if-then-else
> >>using a couple
> >>of tal:conditions, no...
> > Was it ever considered to use line numbers (a la BASIC) to
> change the order
> > of execution (optional, just for an occasional HTML element)?
> How would this look?
Hmm, I didn't give much thought to it because I was expecting this
possibility to have been discussed. Something like
<tal:condition="10 python: a > 0"
tal:define="20 c python: b / a">
> > Still, this wouldn't solve the convenience of having a define, then a
> > condition, then a define (depending on the truth of the condition).
> I can coem up with one that has the first two bits, but what
> would one with all
> three look like?
I don't have a real example right now but it looks like:
tal:condition="python: a > 0"
tal:define="c python: b / a">
You probably want a more convincing case, because the first two could be
merged. But assume "a" is needed afterwards and getSomeValue is an expensive
operation you don't want to recalculate.
More information about the ZPT