summaryrefslogtreecommitdiff
path: root/documentation
diff options
context:
space:
mode:
authorimmerrr again <immerrr@gmail.com>2020-01-07 03:55:42 +0100
committerBenjamin Peterson <benjamin@python.org>2020-01-06 18:55:42 -0800
commit1988faf3f7a7f77c0eccbbc5192f365400d44deb (patch)
treecbb35c98e90da9dcd8f319b16c4ffe607d2c2a50 /documentation
parenta4d9af96b122e98b7be3649b6545e0f6a04c8335 (diff)
downloadsix-git-1988faf3f7a7f77c0eccbbc5192f365400d44deb.tar.gz
Fix wraps handing of missing attrs. (#251)
This is pretty-much a straight backport of Py3 implementations of update_wrapper and (privately) wraps. Fixes #250 Fixes #165 Co-authored-by: Benjamin Peterson <benjamin@python.org>
Diffstat (limited to 'documentation')
-rw-r--r--documentation/index.rst7
1 files changed, 4 insertions, 3 deletions
diff --git a/documentation/index.rst b/documentation/index.rst
index b7ec275..f4c90c9 100644
--- a/documentation/index.rst
+++ b/documentation/index.rst
@@ -257,9 +257,10 @@ functions and methods is the stdlib :mod:`py3:inspect` module.
.. decorator:: wraps(wrapped, assigned=functools.WRAPPER_ASSIGNMENTS, updated=functools.WRAPPER_UPDATES)
- This is exactly the :func:`py3:functools.wraps` decorator, but it sets the
- ``__wrapped__`` attribute on what it decorates as :func:`py3:functools.wraps`
- does on Python versions after 3.2.
+ This is Python 3.2's :func:`py3:functools.wraps` decorator. It sets the
+ ``__wrapped__`` attribute on what it decorates. It doesn't raise an error if
+ any of the attributes mentioned in ``assigned`` and ``updated`` are missing
+ on ``wrapped`` object.
Syntax compatibility