[Zope3-dev] Zope's PathIndex 'level' argument

Tres Seaver tseaver@zope.com
25 Nov 2002 15:02:39 -0500


On Mon, 2002-11-25 at 14:27, Steve Alexander wrote:
> I'm implementing the functionality of a PathIndex for Zope 3.
>=20
> In Zope 2, when querying a PathIndex, you can give it an optional=20
> 'level' argument in addition to the base-path that you're interested in.
>=20
> Does anyone use this 'level' argument? What are its use-cases?
>=20
> The level is 0 by default. There's a comment in the code saying that a=20
> negative level doesn't work yet, but there appears to be code that=20
> implements that case.
>=20
> If anyone does have a use for the 'level' argument, is there a use-case=20
> for supporting negative levels.
>=20
> (I'm deliberately not describing what 'level' does here.)

That's good, because it doesn't do anything I can describe, much less
find a good use for.  What would be much more useful is a 'depth'
argument (or perhaps 'maxdepth' and 'mindepth', =E0 la the Unix 'find'
command).  ('level' is something like 'mindepth', I think).

The original proposal for PathIndex mentioned neither 'depth' nor
'level':

  http://www.zope.org/Wikis/DevSite/Proposals/PathIndexes

Although I lobbied for 'depth' while they were in development.

The original API docs Andreas wrote are here:

  http://www.zope.org//Wikis/DevSite/Proposals/PathIndexDocumentation

Tres.
--=20
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
Tres Seaver                                tseaver@zope.com
Zope Corporation      "Zope Dealers"       http://www.zope.com