diff options
author | Ezio Melotti <ezio.melotti@gmail.com> | 2014-08-05 05:14:28 (GMT) |
---|---|---|
committer | Ezio Melotti <ezio.melotti@gmail.com> | 2014-08-05 05:14:28 (GMT) |
commit | 67f6d5f4d0b166839818f7fbf447a1a2e9ae5b5a (patch) | |
tree | 2a266eebeb92ba734834196d23834fe6b3f129fe /Doc/library/functools.rst | |
parent | 12b7f4821612a01aea6ac904d9b5f039e2d042eb (diff) | |
download | cpython-67f6d5f4d0b166839818f7fbf447a1a2e9ae5b5a.zip cpython-67f6d5f4d0b166839818f7fbf447a1a2e9ae5b5a.tar.gz cpython-67f6d5f4d0b166839818f7fbf447a1a2e9ae5b5a.tar.bz2 |
#21928: clarify functools.wraps docs.
Diffstat (limited to 'Doc/library/functools.rst')
-rw-r--r-- | Doc/library/functools.rst | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/Doc/library/functools.rst b/Doc/library/functools.rst index c46b799..96645c3 100644 --- a/Doc/library/functools.rst +++ b/Doc/library/functools.rst @@ -413,9 +413,10 @@ The :mod:`functools` module defines the following functions: .. decorator:: wraps(wrapped, assigned=WRAPPER_ASSIGNMENTS, updated=WRAPPER_UPDATES) - This is a convenience function for invoking ``partial(update_wrapper, - wrapped=wrapped, assigned=assigned, updated=updated)`` as a function decorator - when defining a wrapper function. For example: + This is a convenience function for invoking :func:`update_wrapper` as a + function decorator when defining a wrapper function. It is equivalent to + ``partial(update_wrapper, wrapped=wrapped, assigned=assigned, updated=updated)``. + For example:: >>> from functools import wraps >>> def my_decorator(f): |