[ZPT] zope3-dev proposal on changing implicitly calling

Steve Alexander steve at cat-box.net
Thu Jul 17 16:35:30 EDT 2003


Chris Withers wrote:
> Florent Guillaume wrote:
> 
>> It's not a proposal at all, it's just me expressing my feelings about 
>> some part of the existing TALES syntax in light of my experience with 
>> it. The proposal that Steve made for Zope 3 is quite different and 
>> goes in the other direction, never calling anything implicitely.
> 
> 
> Interesting, I didn't know that :-(
> 
> So, Steve, under you proposal (which I can't find :-S) how would you go 
> about calling a page template once you had traversed to it?

In the basic TALES implementation, I wouldn't. The behaviour of calling 
things as they are traversed, or at the end of a traversal, should be 
pluggable. The basic TALES implementation should not call anything in 
particular, unless this can be easily overridden.

I think specific users of TALES should be able to supply their own rules 
for when to call something and when not to call something. This is not 
possible at present, because TALES has hardcoded that if the last thing 
traversed to has a __call__ method, it will be called. My proposal is to 
get rid of this hard-coding.

I expect there will be a "here's a common usage" TALES implementation 
that does what TALES does now. However, such hard-coded behaviour should 
not be in the base implementation.

--
Steve Alexander




More information about the ZPT mailing list