From 8b1f6e5ed3f9fc32b5eb03257d24eaf754a797a9 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Wed, 9 Dec 2009 00:34:50 +0000 Subject: - General documentation freshening which takes imperative configuration into account in more places and uses glossary references more liberally. --- repoze/bfg/location.py | 28 ++++++++++++---------------- 1 file changed, 12 insertions(+), 16 deletions(-) (limited to 'repoze/bfg/location.py') diff --git a/repoze/bfg/location.py b/repoze/bfg/location.py index 8e8eff671..fd3bd3792 100644 --- a/repoze/bfg/location.py +++ b/repoze/bfg/location.py @@ -12,18 +12,14 @@ # ############################################################################## -"""Location support loosely based from ``zope.location``, but without -``zope.security`` support or proxy support, neither of which is used -by ``repoze.bfg`` -""" - def inside(model1, model2): """Is ``model1`` 'inside' ``model2``? Return ``True`` if so, else ``False``. - ``model1`` is 'inside' ``model2`` if ``model2`` is a `location - ancestor` of ``model1``. It is a location ancestor if its parent - (or one of its parent's parents, etc.) is an ancestor. + ``model1`` is 'inside' ``model2`` if ``model2`` is a + :term:`lineage` ancestor of ``model1``. It is a lineage ancestor + if its parent (or one of its parent's parents, etc.) is an + ancestor. """ while model1 is not None: if model1 is model2: @@ -34,14 +30,14 @@ def inside(model1, model2): def lineage(model): """ - Return a generator representing the model lineage. The generator - first returns ``model`` unconditionally. Then, if ``model`` - supplies a ``__parent__`` attribute, return the object represented - by ``model.__parent__``. If *that* object has a ``__parent__`` - attribute, return that object's parent, and so on, until the - object being inspected either has no ``__parent__`` attribute or - which has a ``__parent__`` attribute of ``None``. For example, if - the object tree is:: + Return a generator representing the :term:`lineage` of the + ``model``. The generator first returns ``model`` unconditionally. + Then, if ``model`` supplies a ``__parent__`` attribute, return the + object represented by ``model.__parent__``. If *that* object has + a ``__parent__`` attribute, return that object's parent, and so + on, until the object being inspected either has no ``__parent__`` + attribute or which has a ``__parent__`` attribute of ``None``. + For example, if the object tree is:: thing1 = Thing() thing2 = Thing() -- cgit v1.2.3