Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add to README #81

Merged
merged 5 commits into from
Oct 6, 2022
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 17 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,9 @@ This module currently contains the following:

- Experimental features

- (Currently none)
- `override` (see PEP 698)
- The `default=` argument to `TypeVar`, `ParamSpec`, and `TypeVarTuple` (see PEP 696)
- The `infer_variance=` argument to `TypeVar` (see PEP 695)

- In `typing` since Python 3.11

Expand All @@ -50,13 +52,13 @@ This module currently contains the following:
- `reveal_type`
- `Required` (see PEP 655)
- `Self` (see PEP 673)
- `TypeVarTuple` (see PEP 646)
- `TypeVarTuple` (see PEP 646; the `typing_extensions` version supports the `default=` argument from PEP 696)
- `Unpack` (see PEP 646)

- In `typing` since Python 3.10

- `Concatenate` (see PEP 612)
- `ParamSpec` (see PEP 612)
- `ParamSpec` (see PEP 612; the `typing_extensions` version supports the `default=` argument from PEP 696)
- `ParamSpecArgs` (see PEP 612)
- `ParamSpecKwargs` (see PEP 612)
- `TypeAlias` (see PEP 613)
Expand Down Expand Up @@ -96,7 +98,6 @@ This module currently contains the following:
- `Counter`
- `DefaultDict`
- `Deque`
- `NamedTuple`
- `NewType`
- `NoReturn`
- `overload`
Expand All @@ -105,6 +106,13 @@ This module currently contains the following:
- `TYPE_CHECKING`
- `get_type_hints`

- The following have always been present in `typing`, but the `typing_extensions` versions provide
additional features:

- `Any` (supports inheritance since Python 3.11)
- `NamedTuple` (supports inheritance from `Generic` since Python 3.11)
JelleZijlstra marked this conversation as resolved.
Show resolved Hide resolved
- `TypeVar` (see PEPs 695 and 696)

# Other Notes and Limitations

Certain objects were changed after they were added to `typing`, and
Expand All @@ -125,6 +133,11 @@ Certain objects were changed after they were added to `typing`, and
`@typing_extensions.overload`.
- `NamedTuple` was changed in Python 3.11 to allow for multiple inheritance
with `typing.Generic`.
- Since Python 3.11, it has been possible to inherit from `Any` at
runtime. `typing_extensions.Any` also provides this capability.
- `TypeVar` gains two additional parameters, `default=` and `infer_variance=`,
in the draft PEPs 695 and 696, which are being considered for inclusion
in Python 3.12.

There are a few types whose interface was modified between different
versions of typing. For example, `typing.Sequence` was modified to
Expand Down
1 change: 0 additions & 1 deletion src/typing_extensions.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
import typing


# Please keep __all__ alphabetized within each category.
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

They're currently not alphabetized and I don't care.

__all__ = [
# Super-special typing primitives.
'Any',
Expand Down