[New-bugs-announce] [issue44098] Remove ParamSpec from __parameters__ of most typing generics
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".
This patch just makes the typing version same as the builtin version by excluding ``ParamSpec`` from ``__parameters__`` (except for Concatenate, Callable, and Generic).
components: Library (Lib)
nosy: gvanrossum, kj, levkivskyi
title: Remove ParamSpec from __parameters__ of most typing generics
versions: Python 3.10, Python 3.11
Python tracker <report at bugs.python.org>
More information about the New-bugs-announce