diff options
author | immerrr again <immerrr@gmail.com> | 2020-01-07 03:55:42 +0100 |
---|---|---|
committer | Benjamin Peterson <benjamin@python.org> | 2020-01-06 18:55:42 -0800 |
commit | 1988faf3f7a7f77c0eccbbc5192f365400d44deb (patch) | |
tree | cbb35c98e90da9dcd8f319b16c4ffe607d2c2a50 /documentation | |
parent | a4d9af96b122e98b7be3649b6545e0f6a04c8335 (diff) | |
download | six-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.rst | 7 |
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 |