[Zope3-dev] Re: [ZPT] zope3-dev proposal on changing implicitly calling
Steve Alexander
steve@cat-box.net
Sat, 21 Jun 2003 00:12:47 +0300
Lynn Ranen wrote:
> I was under the impression that the TALES was seperate from Zope3.
Yes, in the sense that Zope3 depends on TALES, not the other way around.
> [1] I disagree that the TALES should be modified to work with Zope3
> -- shouldn't it work the other way around?
I am not proposing that TALES be modified to work with Zope 3.
I am proposing that TALES drop its special case for when the result of a
path expression has a __call__ attribute.
Guido has indicated approval of this. Seeing as Python 2.x has new-style
classes with properties, there is no compelling need to have a special
case for callable attributes.
http://mail.zope.org/pipermail/zope3-dev/2003-June/007373.html
> [2] To me, it looks like the behaviour (__call__ at the end of path
> traversal) is similiar to the behaviour of the publishing system.
Which publishing system?
> This appears to be consistent design.
What do you think is consistent with what else?
> In fact, I would go 1 step
> further, and say that what the TALES needs is a 'mapply' -- just like
> the publishing system has.
The policy for evaluating path expressions can be plugged into TALES as
needed. Zope 3 uses this plug-point to make TALES expressions use zope's
traversal mechanisms.
> Then, it will be possible/easy to pass in arguments.
I don't follow how this enables passing in arguments. I'm not sure that
passing in arguments to TALES path expressions is desirable. A lot of
the advantages of TALES comes from its simplicity.
Can you explain what you mean about passing in arguments?
--
Steve Alexander