[Zope-dev] Move implementation of getParent to zope.location?

Martijn Faassen faassen at startifact.com
Thu Aug 6 12:43:42 EDT 2009


Thomas Lotze wrote:
> There are two functions in zope.traversing.api, getParent and getParents,
> that are rather closely related. The former is implemented right in that
> module while the latter adapts its argument to
> zope.location.interfaces.ILocationInfo and calls getParents() on that.
> 
> Why is getParent not a part of ILocationInfo? If there's no good reason,
> I'd propose adding getParent() to the interface and changing the getParent
> function in zope.traversing to work similarly to getParents, i.e. call a
> method on an ILocationInfo adapter.

One question to ask is whether getParent and getParents are used all 
over the place or just by zope.traversing. If they're only used by 
zope.traversing we might not want to move them to a more general place, 
but perhaps we can even see about removing them.

But really, +1 to moving these functions to zope.location.

Regards,

Martijn



More information about the Zope-Dev mailing list