[Zope3-dev] Zope's PathIndex 'level' argument
Andreas Jung
Andreas Jung <lists@andreas-jung.com>
Mon, 25 Nov 2002 20:54:06 +0100
--On Montag, 25. November 2002 19:27 +0000 Steve Alexander
<steve@cat-box.net> wrote:
> I'm implementing the functionality of a PathIndex for Zope 3.
>
> In Zope 2, when querying a PathIndex, you can give it an optional 'level'
> argument in addition to the base-path that you're interested in.
>
> Does anyone use this 'level' argument? What are its use-cases?
Can't remember the use case....maybe check the proposal for PathIndexes.
>
> The level is 0 by default. There's a comment in the code saying that a
> negative level doesn't work yet, but there appears to be code that
> implements that case.
level=-1 means "search on all levels" (check out the unittest for
PathIndexes).
>
> If anyone does have a use for the 'level' argument, is there a use-case
> for supporting negative levels.
>
-1 is the only allowed negative level argument.
-aj