From c6895b23b63365a983cf564fc67446913ef2bebd Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Thu, 24 Dec 2009 01:26:37 +0000 Subject: Roles. --- repoze/bfg/location.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'repoze/bfg/location.py') diff --git a/repoze/bfg/location.py b/repoze/bfg/location.py index fd3bd3792..7472129d2 100644 --- a/repoze/bfg/location.py +++ b/repoze/bfg/location.py @@ -31,11 +31,12 @@ def inside(model1, model2): def lineage(model): """ 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__`` + :term:`model` object implied by the ``model`` argument. 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:: -- cgit v1.2.3