Skip to content

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

Merged
serhiy-storchaka merged 2 commits into
python:3.10from
serhiy-storchaka:backport-d9f9232-3.10
Jul 16, 2021
Merged

[3.10] bpo-44636: Collapse union of equal types (GH-27178)#27181
serhiy-storchaka merged 2 commits into
python:3.10from
serhiy-storchaka:backport-d9f9232-3.10

Conversation

@serhiy-storchaka

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

Copy link
Copy Markdown
Member

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 <storchaka@gmail.com>
@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