Tres Seaver wrote:
> If a subexpression returns a callable, you're telling me that you think
> the "top-level" expression is supposed to call it?  That's nuts!  The
> spec[1] says:
>>> When a TALES path expression is evaluated, it attempts to traverse
>>> each path, from left to right, until it succeeds or runs out of
>>> paths. To traverse a path, it first fetches the object stored in the
>>> variable. For each path segment, it traverses from the current object
>>> to the subobject named by the path segment.
>>> Once a path has been successfully traversed, the resulting object is
>>> the value of the expression. If it is a callable object, such as a
>>> method or class, it is called. The semantics of traversal (and what it
>>> means to be callable) are implementation-dependent.
>>> If a traversal step fails, evaluation immediately proceeds to the
>>> next path. If there are no further paths, an error results.
> Calling the callable happens *before* attempting alternate expressions,
> not after.  That is partly because the *call* might be what triggers
> the alternation.
> [1]

You're absolutely right. I filed a collector issue for Zope 3:

This will be fixed soon in Zope 3.


Zope-Dev maillist  -
**  No cross posts or HTML encoding!  **
(Related lists - )

Reply via email to