diff options
author | Michele Simionato <michele.simionato@gmail.com> | 2015-09-25 04:19:45 +0200 |
---|---|---|
committer | Michele Simionato <michele.simionato@gmail.com> | 2015-09-25 04:19:45 +0200 |
commit | f1d2835e2745b19e8d984c0cb7defd527bd9e9e2 (patch) | |
tree | 7c4e3232a70b084d4b1e7d9b692ce16df3e3f5cd /src | |
parent | 83aff01ac4a17fb104a3af4400160a083aab8ca2 (diff) | |
download | python-decorator-git-4.0.3.tar.gz |
Added a docstring to the memoize example4.0.3
Diffstat (limited to 'src')
-rw-r--r-- | src/decorator.py | 2 | ||||
-rw-r--r-- | src/tests/documentation.py | 5 |
2 files changed, 6 insertions, 1 deletions
diff --git a/src/decorator.py b/src/decorator.py index 7a8b232..b9d3732 100644 --- a/src/decorator.py +++ b/src/decorator.py @@ -33,7 +33,7 @@ for the documentation. """ from __future__ import print_function -__version__ = '4.0.2' +__version__ = '4.0.3' import re import sys diff --git a/src/tests/documentation.py b/src/tests/documentation.py index 766c4c6..8156e3c 100644 --- a/src/tests/documentation.py +++ b/src/tests/documentation.py @@ -1233,6 +1233,11 @@ def _memoize(func, *args, **kw): def memoize(f): + """ + A simple memoize implementation. It works by adding a .cache dictionary + to the decorated function. The cache will grow indefinitely, so it is + your responsability to clear it, if needed. + """ f.cache = {} return decorate(f, _memoize) |