[Zope3-dev] ? vs $

Steve Alexander steve@cat-box.net
Mon, 17 Jun 2002 11:56:53 +0100


Jim Fulton wrote:
> Guido van Rossum wrote:
> 
>>[me]
>>
>>>>Do you *really* want to have an escape to include a / in a pathname
>>>>component?  That sounds like an invitation for obfuscation.
>>>
>>[Jim]
>>
>>>You can traverse to objects in TALES that you can't traverse to in
>>>URLs. We might be looking up an item in a dictionary. Lets say I'm
>>>iterating over the keys in some dictionary and want to display a
>>>value. I wouldn't want the meaning of the path expression to change
>>>just because the key happened to contain some magic character.
>>
>>But we're talking about path expressions here.  These act roughly like
>>nested namespaces.  I wouldn't think that an arbitrary key from a
>>dictionary would make much sense.  But I would expect that there are
>>uses for having a variable be a shortcut for several segments in a
>>path expression.
> 
> 
> I don't agree. Path expressions are that, expressions. I really don't like
> the idea that you would get the source for an expression, rather than the
> data for an expression from a variable.

Please can someone write up a proposal for using $ (or whatever) in path 
expressions, along with a bunch of use-case examples that demonstrate 
the non-trivial cases?

--
Steve Alexander