[Zope3-dev] Notations for paths

Florent Guillaume fg@nuxeo.com
19 Dec 2002 17:00:36 +0100


On Thu, 2002-12-19 at 04:58, kapil thangavelu wrote:
> On Thursday 19 December 2002 06:53 am, Florent Guillaume wrote:
> > I actually quite like this, but it's a big departure from Zope 2 so
> > maybe it would be difficult for developers.
> 
> um. thats the least of their concerns :-)

Right :-)

So how about making that change? To recap:
- The absolute path (=location) 'foo/bar' in tuple form is just
  ('foo', 'bar'). '' or () is the root.
- A relative path has an initial component of '.', so a relative path
  of foo would be './foo' or ('.', 'foo'). '.' or ('.') is "current
  context".

Basically we'd be changing from a special-form tuple for absolute ('' as
initial componenent) to a special-form tuple for relative ('.' as
initial component), but this version would give us a much more regular
way of moving between tuple and Unicode form, juste a matter of
.split('/') or '/'.join().

Comments?

Florent

-- 
Florent Guillaume, Nuxeo (Paris, France)
+33 1 40 33 79 87  http://nuxeo.com  mailto:fg@nuxeo.com