Skip to content

[3.10] bpo-44636: Collapse union of equal types (GH-27178) #27181

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

Merged
merged 2 commits into from
Jul 16, 2021

Conversation

serhiy-storchaka
Copy link
Member

@serhiy-storchaka serhiy-storchaka commented Jul 16, 2021

The result of int | int is now int.

Fix comparison of the union type with non-hashable objects.
int | str == {} no longer raises a TypeError..
(cherry picked from commit d9f9232)

https://bugs.python.org/issue44636

The result of `int | int` is now `int`.

Fix comparison of the union type with non-hashable objects.
`int | str == {}` no longer raises a TypeError..
(cherry picked from commit d9f9232)

Co-authored-by: Serhiy Storchaka <[email protected]>
@serhiy-storchaka serhiy-storchaka merged commit c3007ab into python:3.10 Jul 16, 2021
@serhiy-storchaka serhiy-storchaka deleted the backport-d9f9232-3.10 branch July 16, 2021 11:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type-bug An unexpected behavior, bug, or error
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants