[Zope3-dev] Re: RFC: abolishing python: expressions in ZPT TALES

Philipp von Weitershausen philipp at weitershausen.de
Thu Dec 29 10:07:17 EST 2005


Igor Stroh wrote:
> +/-0
> I'd give it a +1 if TAL would support boolean operators :)

That's something we could give some thought. It might not be that hard
to implement a BooleanExpression for TALES...

> Another use case is the passing of arguments
> to a method/function/whatever - you might have a tal:repeat
> where each iteration calls a view method and where just need
> to supply an argument and you can't since TALs path syntax
> doesn't support that (I say tal:repeat here, 'cos in other
> situations you _probably_ can retrieve the value from REQUEST).

I think the amount of calls from ZPT into content space or any calls
from ZPT at all should be limited IMHO. A while ago we had a discussion
(I think it was on Paul's blog) on push vs. pull. I think ZPTs could be
simplified a lot with more data pushing from Python. Basically, ZPTs
should only be able to understand iterables, mappings and objects with a
public attribute API (let's get rid of that implicit calling too!). I
think this is one of the strongholds of ClearSilver and that's also what
makes it fast like hell (that and the fact it's written in C ;)).

Philipp


More information about the Zope3-dev mailing list