diff options
| -rw-r--r-- | CHANGES.txt | 2 | ||||
| -rw-r--r-- | src/decorator.py | 3 |
2 files changed, 1 insertions, 4 deletions
diff --git a/CHANGES.txt b/CHANGES.txt index 4a9b7b6..90f275b 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -3,7 +3,7 @@ HISTORY 4.0.5 Fixed a bug signaled by David Goldstein: now you can use the name `f` as a keyword argument of decorated functions. Avoid copying the globals, - as signaled by Benjamin Patterson (2015/12/09) + as signaled by Benjamin Peterson (2015/12/09) 4.0.4 Included a patch from Zev Benjamin: now decorated functions play well with cProfile (2015/09/25) 4.0.3 Added a warning about the memoize example, as requested by Robert diff --git a/src/decorator.py b/src/decorator.py index a8c22e7..4e2bb7a 100644 --- a/src/decorator.py +++ b/src/decorator.py @@ -242,7 +242,6 @@ def decorator(caller, _func=None): # else return a decorator function if inspect.isclass(caller): name = caller.__name__.lower() - callerfunc = get_init(caller) doc = 'decorator(%s) converts functions/generators into ' \ 'factories of %s objects' % (caller.__name__, caller.__name__) elif inspect.isfunction(caller): @@ -250,11 +249,9 @@ def decorator(caller, _func=None): name = '_lambda_' else: name = caller.__name__ - callerfunc = caller doc = caller.__doc__ else: # assume caller is an object with a __call__ method name = caller.__class__.__name__.lower() - callerfunc = caller.__call__.__func__ doc = caller.__call__.__doc__ evaldict = dict(_call_=caller, _decorate_=decorate) return FunctionMaker.create( |
