[Zope3-dev] Notations for paths
Gary Poster
gary@modernsongs.com
Thu, 19 Dec 2002 12:46:03 -0500
Florent Guillaume wrote:
> On Thu, 2002-12-19 at 18:01, Phillip J. Eby wrote:
>>Nobody should be doing any conversions directly. There should be a
>>location class, and only strings or instances of the location class should
>>be allowed. Code which uses locations should invoke the location
>>constructor on any input, to ensure that strings become locations.
>
> Why go to those lengths when we can have a perfectly effective location
> as a tuple of names in trivial bijection with a string?
I like the encapsulation idea if it can eliminate the need for the
convenience functions and make that more intuitive. I doubt __str__
should return a unicode type, though, which might be a deal-breaker. Is
that true?