[Zope3-dev] zope3-dev proposal on changing implicitly calling

Chris Withers chrisw@nipltd.com
Mon, 04 Aug 2003 11:38:56 +0100


Steve Alexander wrote:
> No. The base TALES code tries to call the end result, with no arguments, 
> if it has a __call__ attribute. This is what I propose to change, to 
> allow the Zope traversal machinery to control this.

Ah, okay.

> The special case in the default traverser is that if an attribute that 
> has been traversed is a method, it is called with no arguments.

How does the default traverse decide is something is a method?

So, just checking, this calling behaviour applies to all segments within a path 
to be traversed?

Hmmm, if you have a path and you don't want the segments to be called, you have 
to write a special traverse, right?

>> What happens if one of the things that gets called takes more than no 
>> arguments?
> 
> You'll get a TypeError.

...so you'd have to write a specia ltraverse in this case?

cheers,

Chris