summaryrefslogtreecommitdiff
path: root/docs/adapter.rst
diff options
context:
space:
mode:
authorTres Seaver <tseaver@palladion.com>2012-04-06 01:14:45 +0000
committerTres Seaver <tseaver@palladion.com>2012-04-06 01:14:45 +0000
commitdc20d6e62d281e4720ecb317a408611fe2f933c8 (patch)
tree1ae71e0a46c83162553fe80bff56b262f735f509 /docs/adapter.rst
parentcc769a733355d2bc147ff1e7dbf5b4f75f292100 (diff)
downloadzope-interface-dc20d6e62d281e4720ecb317a408611fe2f933c8.tar.gz
Ensure that all doctest blocks get recognized by Sphinx.
Diffstat (limited to 'docs/adapter.rst')
-rw-r--r--docs/adapter.rst8
1 files changed, 4 insertions, 4 deletions
diff --git a/docs/adapter.rst b/docs/adapter.rst
index 298a862..43d100b 100644
--- a/docs/adapter.rst
+++ b/docs/adapter.rst
@@ -120,7 +120,7 @@ Finding out what, if anything, is registered
We can ask if there is an adapter registered for a collection of
interfaces. This is different than lookup, because it looks for an
-exact match.
+exact match::
>>> print registry.registered([IR1], IP1)
11
@@ -199,7 +199,7 @@ We can register and lookup by name too::
When the adapter factory produces `None`, then this is treated as if no
adapter has been found. This allows us to prevent adaptation (when desired)
and let the adapter factory determine whether adaptation is possible based on
-the state of the object being adapted.
+the state of the object being adapted::
>>> def factory(context):
... if context.name == 'object':
@@ -274,7 +274,7 @@ Dict adapters
-------------
At some point it was impossible to register dictionary-based adapters due a
-bug. Let's make sure this works now:
+bug. Let's make sure this works now::
>>> adapter = {}
>>> registry.register((), IQ, '', adapter)
@@ -489,7 +489,7 @@ can unregister a specific subscriber::
['sub_1', 'sub12 1', 'sub12 2']
If we don't specify a value, then all subscribers matching the given
-interfaces will be unsubscribed:
+interfaces will be unsubscribed::
>>> registry.unsubscribe([IR1], IP2)
>>> registry.subscriptions([IR1], IP1)