summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMichele Simionato <michele.simionato@gmail.com>2011-04-22 14:06:55 +0200
committerMichele Simionato <michele.simionato@gmail.com>2011-04-22 14:06:55 +0200
commita4a697b69cbddbd03a5db410a3bcaac52c2afb85 (patch)
treeee1e351668a9438f78bfd86e1432602ffeee17eb /src
parentac2233896698b9d2b7d41ff0fcf47d4cb378df5a (diff)
downloadpython-decorator-git-a4a697b69cbddbd03a5db410a3bcaac52c2afb85.tar.gz
Decorator 3.3.1: micro-fixes for compatibility with Python 3.2.
Diffstat (limited to 'src')
-rw-r--r--src/decorator.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/decorator.py b/src/decorator.py
index d9fb01e..ffc8911 100644
--- a/src/decorator.py
+++ b/src/decorator.py
@@ -162,7 +162,7 @@ class FunctionMaker(object):
@classmethod
def create(cls, obj, body, evaldict, defaults=None,
- doc=None, module=None, addsource=True,**attrs):
+ doc=None, module=None, addsource=True, **attrs):
"""
Create a function from the strings name, signature and body.
evaldict is the evaluation dictionary. If addsource is true an attribute
@@ -193,7 +193,7 @@ def decorator(caller, func=None):
evaldict['_func_'] = func
return FunctionMaker.create(
func, "return _call_(_func_, %(shortsignature)s)",
- evaldict, undecorated=func)
+ evaldict, undecorated=func, __wrapped__=func)
else: # returns a decorator
if isinstance(caller, partial):
return partial(decorator, caller)