-
-
Notifications
You must be signed in to change notification settings - Fork 33.9k
Closed as not planned
Closed as not planned
Copy link
Labels
pendingThe issue will be closed if no feedback is providedThe issue will be closed if no feedback is providedtopic-typingtype-featureA feature request or enhancementA feature request or enhancement
Description
Bug report
This works as expected and as presented in the documentation
from typing import GenericAlias
assert GenericAlias(tuple, (int, str)) == tuple[int, str]However, using the legacy typing interface, the equality check fails
from typing import GenericAlias, Tuple
assert GenericAlias(Tuple, (int, str)) == Tuple[int, str]
#> AssertionErrorThis also fails (and shouldn't work anyway)
from typing import GenericAlias, Tuple
assert GenericAlias(Tuple, (int, str)) == tuple[int, str]
#> AssertionErrorYour environment
- CPython versions tested on: Python 3.9.12
- Operating system and architecture: Manjaro 5.15 x86_64
Metadata
Metadata
Assignees
Labels
pendingThe issue will be closed if no feedback is providedThe issue will be closed if no feedback is providedtopic-typingtype-featureA feature request or enhancementA feature request or enhancement