From 67f6d5f4d0b166839818f7fbf447a1a2e9ae5b5a Mon Sep 17 00:00:00 2001 From: Ezio Melotti Date: Tue, 5 Aug 2014 08:14:28 +0300 Subject: [PATCH] #21928: clarify functools.wraps docs. --- Doc/library/functools.rst | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Doc/library/functools.rst b/Doc/library/functools.rst index c46b7997c1..96645c361c 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): -- 2.40.0