Title: Add __parameters__ and __getitem__ in TypeVar and ParamSpec
Type: enhancement Stage: patch review
Components: Library (Lib) Versions: Python 3.11
Status: open Resolution:
Dependencies: 44794 Superseder:
Assigned To: Nosy List: gvanrossum, kj, serhiy.storchaka
Priority: normal Keywords: patch

Created on 2021-07-31 13:31 by serhiy.storchaka, last changed 2021-07-31 17:50 by serhiy.storchaka.

Pull Requests
URL Status Linked Edit
PR 27511 open serhiy.storchaka, 2021-07-31 13:34
Messages (1)
msg398640 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2021-07-31 13:31
Adding __parameters__ and __getitem__ in TypeVar and ParamSpec allows to generalize and simplify the code (especially the C code) and allows to add more runtime checks. It may open ways for further simplification.

Unfortunately it is not compatible with issue44098, so the latter changes should be reverted.
Date User Action Args
2021-07-31 17:50:42serhiy.storchakasetmessages: - msg398655
2021-07-31 17:50:22serhiy.storchakasetmessages: + msg398655
2021-07-31 13:34:46serhiy.storchakasetkeywords: + patch
stage: patch review
pull_requests: + pull_request26025
2021-07-31 13:32:02serhiy.storchakasetdependencies: + Merge tests for typing.Callable and
2021-07-31 13:31:29serhiy.storchakacreate