[Zope-dev] Re: Zope 3 ZPTs in Zope 2: Nearly done

Chris Withers chris at simplistix.co.uk
Mon May 22 06:41:13 EDT 2006


Tres Seaver wrote:
> Zope2 uses them at the beginning of a path to indicate traversal from
> the root.  -1 to dropping that case (it is the one which makes
> '/foo/bar' behave orthagonally).  

Yeah, I'm actually about -10 to this ;-)

...think about trying to explain why:

context.restrictedTraverse('/plonesite/folder/document').absolute_url()

...works, while the following barfs at you:

tal:attributes="href /plonesite/folder/document/absolue_url"

...which would mean you could no longer use Zope 2's catalog uids as 
paths for traversal, which would be a shame :-/

> Havinng blank elements work as no-ops
> also makes them behave predictably:  this is what command shells (sane
> ones, anyway) do with them.  E.g.:
> 
>   $ ls /path/to//foo
> 
> yiels the same results as:
> 
>   $ ls /path/to/foo
> 
> So -0 to dropping the current blank traversal behavior at all.

Then again, I'm +0.1 on dropping empty path elements anywhere but the 
start of the path...

cheers,

Chris

-- 
Simplistix - Content Management, Zope & Python Consulting
            - http://www.simplistix.co.uk


More information about the Zope-Dev mailing list