[Zope3-dev] Notations for paths
Jim Fulton
jim@zope.com
Fri, 20 Dec 2002 11:23:36 -0500
Florent Guillaume wrote:
> On Fri, 2002-12-20 at 16:52, Steve Alexander wrote:
>
>>Jim Fulton wrote:
>>
>>>I would like to stop using sequences as an alternate canonical
>>>representation. I think that this was a mistake on my part in the
>>>first place.
>>>
>>>Does anybody want to try to take this refactoring job on before
>>>the alpha?
>>>
>>I can take it on for the ObjectHub package.
>>
>
> Can it be stated here that empty name are a priori legal?
> So that we don't have to disambiguate double slashes or final slashes?
> A final slash means traverse to an empty name as the last step, a double
> slash somewhere means an empty name at that point.
>
> The problem then is that we have no way to represent the location of an
> object at the root with an empty name.
>
> Solutions:
> - disallow empty names at the root
> - disallow empty names everywhere
>
> Which do you prefer?
I prefer to disallow empty names everywhere.
'/' means the root.
'' is illegal.
Perhaps an empty path segment should be equivalent to '.'.
That is: '/a', '/a/', and '/a/.' should have the same
meaning, except that I'm define this meaning only for the
last path segment. That is, I'd like the meaning of paths
like '/a//' and 'a//b' to be undefined, at least for now.
Jim
--
Jim Fulton mailto:jim@zope.com Python Powered!
CTO (888) 344-4332 http://www.python.org
Zope Corporation http://www.zope.com http://www.zope.org