From 78034a4e9b643e3b64fc6af8848f8f2ea660fde9 Mon Sep 17 00:00:00 2001 From: Michele Simionato Date: Sat, 16 Mar 2019 10:11:06 +0100 Subject: Docstring --- src/decorator.py | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src') 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 + + """ def __init__(self, caller, *args): self.caller = caller self.args = args -- cgit v1.2.1