Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit275ec39

Browse files
miss-islingtonsobolevnJelleZijlstra
authored
[3.12]gh-119010: Adds docs about__type_params__ tofunctools.update_wrapper (GH-119012) (#119014)
gh-119010: Adds docs about `__type_params__` to `functools.update_wrapper` (GH-119012)(cherry picked from commitb04c497)Co-authored-by: Nikita Sobolev <mail@sobolevn.me>Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
1 parentfcdd20e commit275ec39

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

‎Doc/library/functools.rst

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -644,8 +644,9 @@ The :mod:`functools` module defines the following functions:
644644
attributes of the wrapper function are updated with the corresponding attributes
645645
from the original function. The default values for these arguments are the
646646
module level constants ``WRAPPER_ASSIGNMENTS`` (which assigns to the wrapper
647-
function's ``__module__``, ``__name__``, ``__qualname__``, ``__annotations__``
648-
and ``__doc__``, the documentation string) and ``WRAPPER_UPDATES`` (which
647+
function's ``__module__``, ``__name__``, ``__qualname__``, ``__annotations__``,
648+
``__type_params__``, and ``__doc__``, the documentation string)
649+
and ``WRAPPER_UPDATES`` (which
649650
updates the wrapper function's ``__dict__``, i.e. the instance dictionary).
650651

651652
To allow access to the original function for introspection and other purposes
@@ -675,6 +676,9 @@ The :mod:`functools` module defines the following functions:
675676
function, even if that function defined a ``__wrapped__`` attribute.
676677
(see:issue:`17482`)
677678

679+
..versionchanged::3.12
680+
The ``__type_params__`` attribute is now copied by default.
681+
678682

679683
..decorator::wraps(wrapped, assigned=WRAPPER_ASSIGNMENTS, updated=WRAPPER_UPDATES)
680684

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp