Skip to content

Commit 354b938

Browse files
Add to README (#81)
Co-authored-by: Alex Waygood <[email protected]>
1 parent 3c21f33 commit 354b938

File tree

2 files changed

+17
-5
lines changed

2 files changed

+17
-5
lines changed

README.md

+17-4
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,9 @@ This module currently contains the following:
3535

3636
- Experimental features
3737

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)
3941

4042
- In `typing` since Python 3.11
4143

@@ -50,13 +52,13 @@ This module currently contains the following:
5052
- `reveal_type`
5153
- `Required` (see PEP 655)
5254
- `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)
5456
- `Unpack` (see PEP 646)
5557

5658
- In `typing` since Python 3.10
5759

5860
- `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)
6062
- `ParamSpecArgs` (see PEP 612)
6163
- `ParamSpecKwargs` (see PEP 612)
6264
- `TypeAlias` (see PEP 613)
@@ -96,7 +98,6 @@ This module currently contains the following:
9698
- `Counter`
9799
- `DefaultDict`
98100
- `Deque`
99-
- `NamedTuple`
100101
- `NewType`
101102
- `NoReturn`
102103
- `overload`
@@ -105,6 +106,13 @@ This module currently contains the following:
105106
- `TYPE_CHECKING`
106107
- `get_type_hints`
107108

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+
108116
# Other Notes and Limitations
109117

110118
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
125133
`@typing_extensions.overload`.
126134
- `NamedTuple` was changed in Python 3.11 to allow for multiple inheritance
127135
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.
128141

129142
There are a few types whose interface was modified between different
130143
versions of typing. For example, `typing.Sequence` was modified to

src/typing_extensions.py

-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
import typing
99

1010

11-
# Please keep __all__ alphabetized within each category.
1211
__all__ = [
1312
# Super-special typing primitives.
1413
'Any',

0 commit comments

Comments
 (0)