summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMichele Simionato <michele.simionato@gmail.com>2019-03-16 10:11:06 +0100
committerMichele Simionato <michele.simionato@gmail.com>2019-03-16 10:11:06 +0100
commit78034a4e9b643e3b64fc6af8848f8f2ea660fde9 (patch)
tree7ca8908bf2c4941de4a25d5ca2c67c04c2f2cc6c /src
parent1b6599a22a374e904a09ff47d36db1416fd707cb (diff)
downloadpython-decorator-git-78034a4e9b643e3b64fc6af8848f8f2ea660fde9.tar.gz
Docstring
Diffstat (limited to 'src')
-rw-r--r--src/decorator.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/decorator.py b/src/decorator.py
index 3db3857..f12de69 100644
--- a/src/decorator.py
+++ b/src/decorator.py
@@ -258,6 +258,15 @@ def decorate(func, caller, extras=()):
class Decorator(object):
+ """
+ Decorators with a ``__repr__`` showing the instantiation parameters:
+
+ >>> @Decorator
+ ... def dec(f, *a, **k):
+ ... return f(*a, **k)
+ >>> dec
+ <Decorator dec()>
+ """
def __init__(self, caller, *args):
self.caller = caller
self.args = args