[New-bugs-announce] [issue44098] Remove ParamSpec from __parameters__ of most typing generics
Ken Jin
report at bugs.python.org
Mon May 10 05:41:35 EDT 2021
New submission from Ken Jin <kenjin4096 at gmail.com>:
``typing.List`` includes ``ParamSpec`` in ``__parameters__`` but the builtin ``list`` doesn't. The behavior of the latter is correct, as PEP 612 states that: "As before, parameters_expressions by themselves are not acceptable in places where a type is expected".
https://www.python.org/dev/peps/pep-0612/#valid-use-locations
This patch just makes the typing version same as the builtin version by excluding ``ParamSpec`` from ``__parameters__`` (except for Concatenate, Callable, and Generic).
----------
assignee: kj
components: Library (Lib)
messages: 393373
nosy: gvanrossum, kj, levkivskyi
priority: normal
severity: normal
status: open
title: Remove ParamSpec from __parameters__ of most typing generics
versions: Python 3.10, Python 3.11
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue44098>
_______________________________________
More information about the New-bugs-announce
mailing list