[Python-checkins] cpython (3.4): #21928: clarify functools.wraps docs.
ezio.melotti
python-checkins at python.org
Tue Aug 5 07:15:45 CEST 2014
http://hg.python.org/cpython/rev/9e3c367b45a1
changeset: 92003:9e3c367b45a1
branch: 3.4
parent: 91999:9a410ae785ff
user: Ezio Melotti <ezio.melotti at gmail.com>
date: Tue Aug 05 08:14:28 2014 +0300
summary:
#21928: clarify functools.wraps docs.
files:
Doc/library/functools.rst | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/Doc/library/functools.rst b/Doc/library/functools.rst
--- a/Doc/library/functools.rst
+++ b/Doc/library/functools.rst
@@ -413,9 +413,10 @@
.. 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):
--
Repository URL: http://hg.python.org/cpython
More information about the Python-checkins
mailing list