diff options
| -rw-r--r-- | pyramid/decorator.py | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/pyramid/decorator.py b/pyramid/decorator.py index df30c5e10..72c8b3800 100644 --- a/pyramid/decorator.py +++ b/pyramid/decorator.py @@ -1,4 +1,4 @@ -import functools +from functools import update_wrapper class reify(object): @@ -26,10 +26,14 @@ class reify(object): >>> f.jammy 1 >>> # jammy func not called the second time; it replaced itself with 1 + >>> # Note: reassignment is possible + >>> f.jammy = 2 + >>> f.jammy + 2 """ def __init__(self, wrapped): self.wrapped = wrapped - functools.update_wrapper(self, wrapped) + update_wrapper(self, wrapped) def __get__(self, inst, objtype=None): if inst is None: |
