[ZPT] Re: zope3-dev proposal on changing implicitly calling

Evan Simpson evan at 4-am.com
Wed Jul 16 12:53:47 EDT 2003


Florent Guillaume 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.

Can we get some concrete examples, to nail down this use case?  I would 
have no trouble with auto-calling objects that have type 'function' or 
'instance method', since these are not legitimate candidates for 
attribute or key access.  How often are these useful in the middle of a 
path, though?  It's much more common in Zope for a callable class 
instance to have a number of interesting attributes and even act as a 
mapping.

I've come to the conclusion that it was a mistake for us not to set up a 
proper escape mechanism for TALES from the very beginning.  We should 
have required that any characters other than alphanumeric, space, and 
".-_" characters be escaped with backslashes.  Then we would be free, 
now, to allow "context/somefunc()/something" while still supporting 
"context/somefile\(\)/something".

Cheers,

Evan @ 4-am




More information about the ZPT mailing list