summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSteve Piercy <web@stevepiercy.com>2016-07-03 17:16:55 -0700
committerGitHub <noreply@github.com>2016-07-03 17:16:55 -0700
commite16832d028daf94642df7739f78b4f58d8c306c8 (patch)
treed953c458d7193ae7edf17d28547080d4b805a680
parent384d78a75237ccb98fc7e01e2998a723d03dd455 (diff)
parent2612de2f38094f3c04ebf991f1ca84b02bf5ae3f (diff)
downloadpyramid-e16832d028daf94642df7739f78b4f58d8c306c8.tar.gz
pyramid-e16832d028daf94642df7739f78b4f58d8c306c8.tar.bz2
pyramid-e16832d028daf94642df7739f78b4f58d8c306c8.zip
Merge pull request #2671 from stevepiercy/master
Show testsetup code in rendered docs.
-rw-r--r--pyramid/decorator.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/pyramid/decorator.py b/pyramid/decorator.py
index ea518bfcb..e3a8c707f 100644
--- a/pyramid/decorator.py
+++ b/pyramid/decorator.py
@@ -8,6 +8,16 @@ class reify(object):
replacing the function it decorates with an instance variable. It is, in
Python parlance, a non-data descriptor. An example:
+ .. code-block:: python
+
+ from pyramid.decorator import reify
+
+ class Foo(object):
+ @reify
+ def jammy(self):
+ print('jammy called')
+ return 1
+
.. testsetup::
from pyramid.decorator import reify