From 83aff01ac4a17fb104a3af4400160a083aab8ca2 Mon Sep 17 00:00:00 2001 From: Michele Simionato Date: Mon, 21 Sep 2015 16:34:21 +0200 Subject: Fixed the docs --- src/tests/documentation.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/tests/documentation.py b/src/tests/documentation.py index 81602c8..766c4c6 100644 --- a/src/tests/documentation.py +++ b/src/tests/documentation.py @@ -147,11 +147,14 @@ that depends on non-hashable arguments): $$memoize_uw -Here i used the functools.update_wrapper_ utility, which has +Here I used the functools.update_wrapper_ utility, which has been added in Python 2.5 expressly to simplify the definition of decorators (in older versions of Python you need to copy the function attributes ``__name__``, ``__doc__``, ``__module__`` and ``__dict__`` from the original function to the decorated function by hand). +Here is an example of usage: + +$$f1 .. _functools.update_wrapper: https://docs.python.org/3/library/functools.html#functools.update_wrapper -- cgit v1.2.1