diff options
author | Antoine Pitrou <solipsis@pitrou.net> | 2010-08-04 18:28:02 (GMT) |
---|---|---|
committer | Antoine Pitrou <solipsis@pitrou.net> | 2010-08-04 18:28:02 (GMT) |
commit | 560f7647ce5991140e215a7ac775130798c92dc8 (patch) | |
tree | 7b19296ddf3d8a0d111766226cff9367f77bd619 /Doc/library/functools.rst | |
parent | 5626eec0c2f62999967eff0ab6aa8ad329e8571b (diff) | |
download | cpython-560f7647ce5991140e215a7ac775130798c92dc8.zip cpython-560f7647ce5991140e215a7ac775130798c92dc8.tar.gz cpython-560f7647ce5991140e215a7ac775130798c92dc8.tar.bz2 |
Issue #8814: function annotations (the `__annotations__` attribute)
are now included in the set of attributes copied by default by
functools.wraps and functools.update_wrapper. Patch by Terrence Cole.
Diffstat (limited to 'Doc/library/functools.rst')
-rw-r--r-- | Doc/library/functools.rst | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Doc/library/functools.rst b/Doc/library/functools.rst index c6f5870..39b0e7b 100644 --- a/Doc/library/functools.rst +++ b/Doc/library/functools.rst @@ -165,9 +165,9 @@ The :mod:`functools` module defines the following functions: attributes of the wrapper function are updated with the corresponding attributes from the original function. The default values for these arguments are the module level constants *WRAPPER_ASSIGNMENTS* (which assigns to the wrapper - function's *__name__*, *__module__* and *__doc__*, the documentation string) and - *WRAPPER_UPDATES* (which updates the wrapper function's *__dict__*, i.e. the - instance dictionary). + function's *__name__*, *__module__*, *__annotations__* and *__doc__*, the + documentation string) and *WRAPPER_UPDATES* (which updates the wrapper + function's *__dict__*, i.e. the instance dictionary). The main intended use for this function is in :term:`decorator` functions which wrap the decorated function and return the wrapper. If the wrapper function is |