From a4a697b69cbddbd03a5db410a3bcaac52c2afb85 Mon Sep 17 00:00:00 2001 From: Michele Simionato Date: Fri, 22 Apr 2011 14:06:55 +0200 Subject: Decorator 3.3.1: micro-fixes for compatibility with Python 3.2. --- src/decorator.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') 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) -- cgit v1.2.1