[Python-checkins] cpython (2.7): #21928: clarify functools.wraps docs.
ezio.melotti
python-checkins at python.org
Tue Aug 5 07:15:48 CEST 2014
http://hg.python.org/cpython/rev/6cbd08fbdf77
changeset: 92005:6cbd08fbdf77
branch: 2.7
parent: 92002:5e310c6a8520
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
@@ -124,9 +124,10 @@
.. function:: wraps(wrapped[, assigned][, updated])
- 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