summaryrefslogtreecommitdiff
path: root/docs/narr/resources.rst
diff options
context:
space:
mode:
authorChris McDonough <chrism@plope.com>2012-02-15 16:23:59 -0500
committerChris McDonough <chrism@plope.com>2012-02-15 16:23:59 -0500
commit1ca5b34f17ea889f705c1120a5b8878bff16ec63 (patch)
tree779b6b04fb29cd6e7d31bd8bd499dadcd49dcb50 /docs/narr/resources.rst
parent2e7f0cfb4c5f0a4804e0c44cdf181c2ee35b020a (diff)
downloadpyramid-1ca5b34f17ea889f705c1120a5b8878bff16ec63.tar.gz
pyramid-1ca5b34f17ea889f705c1120a5b8878bff16ec63.tar.bz2
pyramid-1ca5b34f17ea889f705c1120a5b8878bff16ec63.zip
- Replace all mentions of zope.interface.implements with
zope.interface.implementer.
Diffstat (limited to 'docs/narr/resources.rst')
-rw-r--r--docs/narr/resources.rst10
1 files changed, 5 insertions, 5 deletions
diff --git a/docs/narr/resources.rst b/docs/narr/resources.rst
index 256f69fc3..83734be9f 100644
--- a/docs/narr/resources.rst
+++ b/docs/narr/resources.rst
@@ -540,14 +540,14 @@ declares that the blog entry implements an :term:`interface`.
:linenos:
import datetime
- from zope.interface import implements
+ from zope.interface import implementer
from zope.interface import Interface
class IBlogEntry(Interface):
pass
+ @implementer(IBlogEntry)
class BlogEntry(object):
- implements(IBlogEntry)
def __init__(self, title, body, author):
self.title = title
self.body = body
@@ -556,15 +556,15 @@ declares that the blog entry implements an :term:`interface`.
This resource consists of two things: the class which defines the resource
constructor as the class ``BlogEntry``, and an :term:`interface` attached to
-the class via an ``implements`` statement at class scope using the
-``IBlogEntry`` interface as its sole argument.
+the class via an ``implementer`` class decorator using the ``IBlogEntry``
+interface as its sole argument.
The interface object used must be an instance of a class that inherits from
:class:`zope.interface.Interface`.
A resource class may implement zero or more interfaces. You specify that a
resource implements an interface by using the
-:func:`zope.interface.implements` function at class scope. The above
+:func:`zope.interface.implementer` function as a class decorator. The above
``BlogEntry`` resource implements the ``IBlogEntry`` interface.
You can also specify that a particular resource *instance* provides an