Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 67f6d5f

Browse files
committed
#21928: clarify functools.wraps docs.
1 parent 12b7f48 commit 67f6d5f

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

Doc/library/functools.rst

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -413,9 +413,10 @@ The :mod:`functools` module defines the following functions:
413413

414414
.. decorator:: wraps(wrapped, assigned=WRAPPER_ASSIGNMENTS, updated=WRAPPER_UPDATES)
415415

416-
This is a convenience function for invoking ``partial(update_wrapper,
417-
wrapped=wrapped, assigned=assigned, updated=updated)`` as a function decorator
418-
when defining a wrapper function. For example:
416+
This is a convenience function for invoking :func:`update_wrapper` as a
417+
function decorator when defining a wrapper function. It is equivalent to
418+
``partial(update_wrapper, wrapped=wrapped, assigned=assigned, updated=updated)``.
419+
For example::
419420

420421
>>> from functools import wraps
421422
>>> def my_decorator(f):

0 commit comments

Comments
 (0)