diff options
| author | Michele Simionato <michele.simionato@gmail.com> | 2017-07-15 12:30:06 +0200 |
|---|---|---|
| committer | Michele Simionato <michele.simionato@gmail.com> | 2017-07-15 12:30:06 +0200 |
| commit | f068b08cf60cecea4b540d3a36550d0d29455b0e (patch) | |
| tree | b26ba30d256099f5e93675afa37b29c9149b962a /src | |
| parent | ef69f00853d23ede9bb34391b066f674a496be72 (diff) | |
| download | python-decorator-git-f068b08cf60cecea4b540d3a36550d0d29455b0e.tar.gz | |
Generating the documentation for ReadTheDocs
Diffstat (limited to 'src')
| -rw-r--r-- | src/tests/documentation.py | 7 |
1 files changed, 3 insertions, 4 deletions
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 <BLANKLINE> (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 |
