summaryrefslogtreecommitdiff
path: root/docs/narr
diff options
context:
space:
mode:
authorCasey Duncan <casey.duncan@gmail.com>2010-12-20 23:46:30 -0700
committerCasey Duncan <casey.duncan@gmail.com>2010-12-20 23:46:30 -0700
commit5f0a81a0fd40afcabd4e8f3185136f829193d4bc (patch)
tree02e0836f13e926005bec3fc7189ad54e862aed92 /docs/narr
parent14575f52880028537594eb06b35f2b39dd9818c9 (diff)
downloadpyramid-5f0a81a0fd40afcabd4e8f3185136f829193d4bc.tar.gz
pyramid-5f0a81a0fd40afcabd4e8f3185136f829193d4bc.tar.bz2
pyramid-5f0a81a0fd40afcabd4e8f3185136f829193d4bc.zip
make it clear that leaf resource's __getitem__ must always raise KeyError
Diffstat (limited to 'docs/narr')
-rw-r--r--docs/narr/resources.rst6
1 files changed, 3 insertions, 3 deletions
diff --git a/docs/narr/resources.rst b/docs/narr/resources.rst
index 7b31a8260..6350f01ec 100644
--- a/docs/narr/resources.rst
+++ b/docs/narr/resources.rst
@@ -26,7 +26,7 @@ much less important in applications that use URL dispatch than applications
that use traversal.
In "Zope-like" :app:`Pyramid` applications, resource objects also often store
-data persistently and offer methods related to mutating that persistent data.
+data persistently, and offer methods related to mutating that persistent data.
In these kinds of applications, resources not only represent the site
structure of your website, but they become the :term:`domain model` of the
application.
@@ -72,8 +72,8 @@ tree:
the container's ``__getitem__`` should return the sub-resource.
- Leaf resources, which do not contain other resources, must not implement a
- ``__getitem__``, or if they do, their ``__getitem__`` method must raise a
- :exc:`KeyError`.
+ ``__getitem__``, or if they do, their ``__getitem__`` method must always
+ raise a :exc:`KeyError`.
See :ref:`traversal_chapter` for more information about how traversal
works against resource instances.