]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
bpo-44646: Fix the hash of the union type. (#27179)
authorSerhiy Storchaka <storchaka@gmail.com>
Fri, 16 Jul 2021 08:34:56 +0000 (11:34 +0300)
committerGitHub <noreply@github.com>
Fri, 16 Jul 2021 08:34:56 +0000 (10:34 +0200)
commitaeaa553d650786afc6e68df1f4813ae1a5b71d05
treede8f5af334a132649dc3f7898b012b8a200c9259
parent919ad537510fdc2c750109e0bc4eceea234324b2
bpo-44646: Fix the hash of the union type. (#27179)

It no longer depends on the order of arguments.
hash(int | str) == hash(str | int)

Co-authored-by: Jack DeVries <58614260+jdevries3133@users.noreply.github.com>
Lib/test/test_types.py
Misc/NEWS.d/next/Core and Builtins/2021-07-16-09-59-13.bpo-44646.Yb6s05.rst [new file with mode: 0644]
Objects/unionobject.c