diff options
| author | Casey Duncan <casey.duncan@gmail.com> | 2010-12-14 23:41:30 -0700 |
|---|---|---|
| committer | Casey Duncan <casey.duncan@gmail.com> | 2010-12-14 23:41:30 -0700 |
| commit | c2a2d3930bbf65c1e56315196d4bdc08906312aa (patch) | |
| tree | c9198d8f3d4d236c0013b0143c33a44324cf4c37 /docs | |
| parent | 1038f50c158ab2104e639cc1e60d6277dbe5648e (diff) | |
| download | pyramid-c2a2d3930bbf65c1e56315196d4bdc08906312aa.tar.gz pyramid-c2a2d3930bbf65c1e56315196d4bdc08906312aa.tar.bz2 pyramid-c2a2d3930bbf65c1e56315196d4bdc08906312aa.zip | |
describe container nodes and leaf nodes as such directly
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/narr/models.rst | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/docs/narr/models.rst b/docs/narr/models.rst index a1e21d2bb..086c61d45 100644 --- a/docs/narr/models.rst +++ b/docs/narr/models.rst @@ -203,18 +203,18 @@ Defining a Graph of Model Instances for Traversal When :term:`traversal` is used (as opposed to a purely :term:`url dispatch` based application), :app:`Pyramid` expects to be able to traverse a graph composed of model instances. Traversal begins at a -root model, and descends into the graph recursively via each found -model's ``__getitem__`` method. :app:`Pyramid` imposes the +root model instance, and descends into the graph recursively via each +found model's ``__getitem__`` method. :app:`Pyramid` imposes the following policy on model instance nodes in the graph: -- Nodes which contain other nodes (aka "container" nodes) must supply +- Container nodes (i.e., nodes which contain other nodes) must supply a ``__getitem__`` method which is willing to resolve a unicode name to a subobject. If a subobject by that name does not exist in the container, ``__getitem__`` must raise a :exc:`KeyError`. If a subobject by that name *does* exist, the container should return the subobject (another model instance). -- Nodes which do not contain other nodes (aka "leaf" nodes) must not +- Leaf nodes, which do not contain other nodes, must not implement a ``__getitem__``, or if they do, their ``__getitem__`` method must raise a :exc:`KeyError`. |
