We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
__type_params__
functools.update_wrapper
1 parent 7d7eec5 commit b04c497Copy full SHA for b04c497
1 file changed
Doc/library/functools.rst
@@ -646,8 +646,9 @@ The :mod:`functools` module defines the following functions:
646
attributes of the wrapper function are updated with the corresponding attributes
647
from the original function. The default values for these arguments are the
648
module level constants ``WRAPPER_ASSIGNMENTS`` (which assigns to the wrapper
649
- function's ``__module__``, ``__name__``, ``__qualname__``, ``__annotations__``
650
- and ``__doc__``, the documentation string) and ``WRAPPER_UPDATES`` (which
+ function's ``__module__``, ``__name__``, ``__qualname__``, ``__annotations__``,
+ ``__type_params__``, and ``__doc__``, the documentation string)
651
+ and ``WRAPPER_UPDATES`` (which
652
updates the wrapper function's ``__dict__``, i.e. the instance dictionary).
653
654
To allow access to the original function for introspection and other purposes
@@ -677,6 +678,9 @@ The :mod:`functools` module defines the following functions:
677
678
function, even if that function defined a ``__wrapped__`` attribute.
679
(see :issue:`17482`)
680
681
+ .. versionchanged:: 3.12
682
+ The ``__type_params__`` attribute is now copied by default.
683
+
684
685
.. decorator:: wraps(wrapped, assigned=WRAPPER_ASSIGNMENTS, updated=WRAPPER_UPDATES)
686
0 commit comments