summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMichele Simionato <michele.simionato@gmail.com>2015-07-20 06:41:43 +0200
committerMichele Simionato <michele.simionato@gmail.com>2015-07-20 06:41:43 +0200
commitcc752587247ffe103bacfa86e84b5797959cd845 (patch)
tree53c6d3bae62eb88861826c77ae741534549895ec /src
parenta4e7a82790a134ca44746de88bdc0354e90c442c (diff)
downloadpython-decorator-git-cc752587247ffe103bacfa86e84b5797959cd845.tar.gz
More work on the documentation
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()