summaryrefslogtreecommitdiff
path: root/paste/registry.py
diff options
context:
space:
mode:
authorbbangert <devnull@localhost>2006-09-02 23:40:11 +0000
committerbbangert <devnull@localhost>2006-09-02 23:40:11 +0000
commit7e3e549af3852c87697885df4b60daa8b63b370f (patch)
tree720145c564522be8df81c74e4943ce685b94dd7c /paste/registry.py
parente944374d649a29449b4a3266a485eb5ca31ecf78 (diff)
downloadpaste-7e3e549af3852c87697885df4b60daa8b63b370f.tar.gz
Adding code-block directive to Python code samples.
Diffstat (limited to 'paste/registry.py')
-rw-r--r--paste/registry.py12
1 files changed, 9 insertions, 3 deletions
diff --git a/paste/registry.py b/paste/registry.py
index a34dbde..283fd39 100644
--- a/paste/registry.py
+++ b/paste/registry.py
@@ -22,7 +22,9 @@ actually "be" during the request is then registered with the
RegistryManager middleware, which ensures that for the scope of the current
WSGI application everything will work properly.
-Example::
+Example:
+
+.. code-block:: Python
#yourpackage/__init__.py
@@ -60,7 +62,9 @@ when developing web applications.
Should you be developing a system which may be accessing the proxy object
thousands of times per request, the performance of the proxy will start to
become more noticeabe. In that circumstance, the problem can be avoided by
-getting at the actual object via the proxy with the ``_curent_obj`` function::
+getting at the actual object via the proxy with the ``_curent_obj`` function:
+
+.. code-block:: Python
#sessions.py
Session = StackedObjectProxy()
@@ -190,7 +194,9 @@ class StackedObjectProxy(object):
def _push_object(self, obj):
"""Make ``obj`` the active object for this thread-local.
- This should be used like::
+ This should be used like:
+
+ .. code-block:: Python
obj = yourobject()
module.glob = StackedObjectProxy()