bpo-44633: Fix parameter substitution of the union type with wrong types. (GH-27218) (GH-27224)

A TypeError is now raised instead of returning NotImplemented.
(cherry picked from commit 3ea5332a43)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
This commit is contained in:
Miss Islington (bot) 2021-07-18 04:59:25 -07:00 committed by GitHub
parent 03aad3049d
commit 85b58292cf
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 36 additions and 16 deletions

View file

@ -0,0 +1,2 @@
Parameter substitution of the union type with wrong types now raises
``TypeError`` instead of returning ``NotImplemented``.