]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
bpo-44636: Collapse union of equal types (GH-27178)
authorSerhiy Storchaka <storchaka@gmail.com>
Fri, 16 Jul 2021 09:49:33 +0000 (12:49 +0300)
committerGitHub <noreply@github.com>
Fri, 16 Jul 2021 09:49:33 +0000 (12:49 +0300)
commitd9f923280f204204f8703756aef4f655b579b4b8
treea7f4bae4b05868d51cbb81a5faa1812f1df47106
parentaeaa553d650786afc6e68df1f4813ae1a5b71d05
bpo-44636: Collapse union of equal types (GH-27178)

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.
Lib/test/test_types.py
Misc/NEWS.d/next/Core and Builtins/2021-07-16-09-36-12.bpo-44636.ZWebi8.rst [new file with mode: 0644]
Objects/unionobject.c