Issue 44633: Indexing the union type can return NotImplemented - Python tracker

This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
process
Status: closed Resolution: fixed
Dependencies: 44632 Superseder:
Assigned To: Nosy List: gvanrossum, kj, miss-islington, serhiy.storchaka, uriyyo
Priority: normal Keywords: patch

Created on 2021-07-14 05:42 by serhiy.storchaka, last changed 2022-04-11 14:59 by admin. This issue is now closed.

Pull Requests
URL Status Linked Edit
PR 27218 merged serhiy.storchaka, 2021-07-17 18:08
PR 27224 merged miss-islington, 2021-07-18 09:10
Messages (4)
msg397468 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2021-07-14 05:42
>>> import typing
>>> (int | typing.T)[1]
NotImplemented

It is related to issue44632.
msg397625 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2021-07-16 13:33
Expected raising a TypeError.
msg397744 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2021-07-18 09:10
New changeset 3ea5332a4365bdd771286b3e9692495116e9ceef by Serhiy Storchaka in branch 'main':
bpo-44633: Fix parameter substitution of the union type with wrong types. (GH-27218)
https://github.com/python/cpython/commit/3ea5332a4365bdd771286b3e9692495116e9ceef
msg397746 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2021-07-18 11:59
New changeset 85b58292cf94de74d028053ac33a65f269f305cb by Miss Islington (bot) in branch '3.10':
bpo-44633: Fix parameter substitution of the union type with wrong types. (GH-27218) (GH-27224)
https://github.com/python/cpython/commit/85b58292cf94de74d028053ac33a65f269f305cb