[ZPT] TALES

Evan Simpson evan@4-am.com
Wed, 12 Feb 2003 12:24:26 -0600


Florent Guillaume wrote:
> How would you do the following in TALES?
> 
>     python:here.foo(1,2,3) | python:here.bar(4,5)

Ooh, tricky.  I can only think of two ways, and one is undocumented. 
First, if you could factor "here.foo(1,2,3)" into a Script, you could use:

here/foo123 | python:here.bar(4,5)

If you're willing to use an undocumented expression type that could go 
away in the future, try:

tal:define="foo123 defer:python:here.foo(1,2,3);
             result foo123 | python:here.bar(4,5)"

Cheers,

Evan @ 4-am