@@ -35,7 +35,9 @@ This module currently contains the following:
35
35
36
36
- Experimental features
37
37
38
- - (Currently none)
38
+ - ` override ` (see PEP 698)
39
+ - The ` default= ` argument to ` TypeVar ` , ` ParamSpec ` , and ` TypeVarTuple ` (see PEP 696)
40
+ - The ` infer_variance= ` argument to ` TypeVar ` (see PEP 695)
39
41
40
42
- In ` typing ` since Python 3.11
41
43
@@ -50,13 +52,13 @@ This module currently contains the following:
50
52
- ` reveal_type `
51
53
- ` Required ` (see PEP 655)
52
54
- ` Self ` (see PEP 673)
53
- - ` TypeVarTuple ` (see PEP 646)
55
+ - ` TypeVarTuple ` (see PEP 646; the ` typing_extensions ` version supports the ` default= ` argument from PEP 696 )
54
56
- ` Unpack ` (see PEP 646)
55
57
56
58
- In ` typing ` since Python 3.10
57
59
58
60
- ` Concatenate ` (see PEP 612)
59
- - ` ParamSpec ` (see PEP 612)
61
+ - ` ParamSpec ` (see PEP 612; the ` typing_extensions ` version supports the ` default= ` argument from PEP 696 )
60
62
- ` ParamSpecArgs ` (see PEP 612)
61
63
- ` ParamSpecKwargs ` (see PEP 612)
62
64
- ` TypeAlias ` (see PEP 613)
@@ -96,7 +98,6 @@ This module currently contains the following:
96
98
- ` Counter `
97
99
- ` DefaultDict `
98
100
- ` Deque `
99
- - ` NamedTuple `
100
101
- ` NewType `
101
102
- ` NoReturn `
102
103
- ` overload `
@@ -105,6 +106,13 @@ This module currently contains the following:
105
106
- ` TYPE_CHECKING `
106
107
- ` get_type_hints `
107
108
109
+ - The following have always been present in ` typing ` , but the ` typing_extensions ` versions provide
110
+ additional features:
111
+
112
+ - ` Any ` (supports inheritance since Python 3.11)
113
+ - ` NamedTuple ` (supports multiple inheritance with ` Generic ` since Python 3.11)
114
+ - ` TypeVar ` (see PEPs 695 and 696)
115
+
108
116
# Other Notes and Limitations
109
117
110
118
Certain objects were changed after they were added to ` typing ` , and
@@ -125,6 +133,11 @@ Certain objects were changed after they were added to `typing`, and
125
133
` @typing_extensions.overload ` .
126
134
- ` NamedTuple ` was changed in Python 3.11 to allow for multiple inheritance
127
135
with ` typing.Generic ` .
136
+ - Since Python 3.11, it has been possible to inherit from ` Any ` at
137
+ runtime. ` typing_extensions.Any ` also provides this capability.
138
+ - ` TypeVar ` gains two additional parameters, ` default= ` and ` infer_variance= ` ,
139
+ in the draft PEPs 695 and 696, which are being considered for inclusion
140
+ in Python 3.12.
128
141
129
142
There are a few types whose interface was modified between different
130
143
versions of typing. For example, ` typing.Sequence ` was modified to
0 commit comments