Skip to content

Commit

Permalink
PEP 695: __type_params__ attribute is writable
Browse files Browse the repository at this point in the history
Fixes python/cpython#104600.

We realized that the attribute should be writable on functions and
classes for the benefit of wrappers such as @functools.wraps.
  • Loading branch information
JelleZijlstra committed Oct 1, 2023
1 parent 186c5ad commit 4e4357f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion peps/pep-0695.rst
Original file line number Diff line number Diff line change
Expand Up @@ -602,7 +602,7 @@ is a generator or coroutine.
Accessing Type Parameters at Runtime
------------------------------------

A new read-only attribute called ``__type_params__`` is available on generic classes,
A new attribute called ``__type_params__`` is available on generic classes,
functions, and type aliases. This attribute is a tuple of the
type parameters that parameterize the class, function, or alias.
The tuple contains ``TypeVar``, ``ParamSpec``, and ``TypeVarTuple`` instances.
Expand Down

0 comments on commit 4e4357f

Please sign in to comment.