[ZPT] zope3-dev proposal on changing implicitly calling

Florent Guillaume fg at nuxeo.com
Wed Jul 16 13:26:46 EDT 2003


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.

Florent

Charlie Clark wrote:
> On 2003-07-15 at 13:38:37 [+0200], Chris Withers wrote:
> 
>>>To be honest, this sucks. I've always wanted to write
>>>
>>>   context/somefunc/something/etc
>>>
>>>and have TALES realize that somefunc, being a method, is callable and 
>>>couldn't possibly have a 'something' attribute or key.
>>
>>How do you differentiate when somefunc would be called and when it 
>>wouldn't?
>>
>>What parameters would somefunc be called with?
>>
>>What would happen if somefunc was callable and took one parameter?
> 
> 
> This discussion obviously started somewhere else and before my time on this 
> list so please forgive me if I am miscontruing things.
> 
> The proposed change is to allow us to access functions within methods to 
> callable but not to be able to pass them parameters? I've never had to do 
> anything similar as in the supplied example which makes me sceptical but I 
> guess my biggest gripe would be having to switch between path and python 
> expressions when calling something that initially doesn't take explicit 
> parameters to something that does:
> 
> <br tal:content="here/myScript">
> and
> <br tal:content="python: here.myScript(a="a")>
> 
> This is counterintuitive... 
> 
> """> Fine. For page templates in Zope, I think Zope should take 
> 
>>responsibility for deciding what is callable and what is not, not TALES.
>>
>>For TALES in other applications, I think the path expression handler for 
>>that application should decide what is callable and what is not, not 
> 
> TALES.
> """
> 
> ... and if I understand Stevecorrectly it should be possible to do this 
> within TALES
> <br tal:content="here/myScript(a="a")>
> 
> In fact I would then be happy always having brackets for calling anything 
> method or function just as in Python.  mm, maybe this is the answer to a 
> different question? If not the proposed change does not get my vote.
> 
> Charlie
> 

-- 
Florent Guillaume, Nuxeo (Paris, France)
+33 1 40 33 79 87  http://nuxeo.com  mailto:fg at nuxeo.com




More information about the ZPT mailing list