[ZPT] zope3-dev proposal on changing implicitly calling
Charlie Clark
charlie at begeistert.org
Wed Jul 16 10:25:24 EDT 2003
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
More information about the ZPT
mailing list