◐ Shell
clean mode source ↗

bpo-44636: Collapse union of equal types by serhiy-storchaka · Pull Request #27178 · python/cpython

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.

Fidget-Spinner

serhiy-storchaka added a commit to serhiy-storchaka/cpython that referenced this pull request

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)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>

serhiy-storchaka added a commit that referenced this pull request

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)