[Zope-dev] RE: Subpath traversal interface (was RE: ANN: Python Methods 0.1.
7 up and over to DC)
7 up and over to DC)
Michel Pelletier
michel@digicool.com
Tue, 14 Dec 1999 12:34:12 -0500
> -----Original Message-----
> From: Phillip J. Eby [mailto:pje@telecommunity.com]
>
> It seems to me that what is wanted is a "traversable object",
> rather than a
> traversable method. That is, at least for the places where
> I've wanted to
> use such a thing, I wanted to be able to define a
> "__bobo_traverse__" with
> a PythonMethod. But then, I don't want the whole path from
> there either, I
> just want to be able to get the next element. In any case,
> it seems to me
> that the best way to do this is create a Traversable base
> class that can be
> used in ZClasses, that defers __bobo_traverse__ to a method name
> ZopeTraverse or some such. Then that method can be implemented in the
> ZClass however it is desired, whether by a PythonMethod, DTML
> method, or
> even an SQL method, if appropriate.
>
> IMHO, this doesn't belong in PythonMethods at all.
I think I agree there. Subclassing traversability sounds cleaner.
> (But
> then, I don't know
> what the contributor was using it for, so perhaps some input
> there would be
> useful.)
Evan?
-Michel