Skip to content

Update CHANGELOG.md to point out PEP 695 initial support#17164

Merged
svalentin merged 3 commits intomasterfrom
svalentin-changelog-update
Apr 24, 2024
Merged

Update CHANGELOG.md to point out PEP 695 initial support#17164
svalentin merged 3 commits intomasterfrom
svalentin-changelog-update

Conversation

@svalentin
Copy link
Collaborator

No description provided.

@svalentin svalentin requested a review from JukkaL April 24, 2024 11:49
CHANGELOG.md Outdated
ListOrSet = TypeAliasType("ListOrSet", list[T] | set[T], type_params=(T,))
a: ListOrSet = [1, 2]
b: ListOrSet = {'a', 'b'}
c: ListOrSet = 'test' # error: Incompatible types in assignment (expression has type "str", variable has type "list[Any] | set[Any]") [assignment]
Copy link
Collaborator

Choose a reason for hiding this comment

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

Use ListOrSet[int], ListOrSet[str] etc. to highlight that this is a generic type alias.

@svalentin svalentin merged commit 43e130b into master Apr 24, 2024
@svalentin svalentin deleted the svalentin-changelog-update branch April 24, 2024 13:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants