From f068b08cf60cecea4b540d3a36550d0d29455b0e Mon Sep 17 00:00:00 2001 From: Michele Simionato Date: Sat, 15 Jul 2017 12:30:06 +0200 Subject: Generating the documentation for ReadTheDocs --- src/tests/documentation.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/tests/documentation.py b/src/tests/documentation.py index 74952ca..eb69b9d 100644 --- a/src/tests/documentation.py +++ b/src/tests/documentation.py @@ -2,7 +2,7 @@ from __future__ import print_function doc = r"""\ The ``decorator`` module -============================================================= +------------------------ :Author: Michele Simionato :E-mail: michele.simionato@gmail.com @@ -161,7 +161,7 @@ Here I used the functools.update_wrapper_ utility, which was added in Python 2.5 to simplify the writing of decorators. (Previously, you needed to manually copy the function attributes ``__name__``, ``__doc__``, ``__module__``, and ``__dict__`` -to the decorated function by hand.) +to the decorated function by hand). Here is an example of usage: @@ -618,8 +618,7 @@ $$example (See bug report 1764286_ for an explanation of what is happening). -Unfortunately the bug still exists in all versions of Python, except -Python 3.5. +Unfortunately the bug still exists in all versions of Python < 3.5. However, there is a workaround. The decorated function has the ``__wrapped__`` attribute, pointing to the original function. The simplest way to get the -- cgit v1.2.1