summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/decorator.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/decorator.py b/src/decorator.py
index ed5c6e0..c7ed19e 100644
--- a/src/decorator.py
+++ b/src/decorator.py
@@ -1,4 +1,4 @@
-# ######################### LICENCE ############################ #
+# ######################### LICENSE ############################ #
# Copyright (c) 2005-2015, Michele Simionato
# All rights reserved.
@@ -200,9 +200,9 @@ class FunctionMaker(object):
evaldict, addsource, **attrs)
-def decorate(caller, func):
+def decorate(func, caller):
"""
- decorate(caller, func) decorates a function using a caller.
+ decorate(func, caller) decorates a function using a caller.
"""
evaldict = func.__globals__.copy()
evaldict['_call_'] = caller
@@ -216,7 +216,7 @@ def decorator(caller, _func=None):
"""decorator(caller) converts a caller function into a decorator"""
if _func is not None: # return a decorated function
# this is obsolete behavior; you should use decorate instead
- return decorate(caller, _func)
+ return decorate(_func, caller)
# else return a decorator function
if inspect.isclass(caller):
name = caller.__name__.lower()