[issue44793] Arguments ignored in substitution in typing.Callable

Serhiy Storchaka report at bugs.python.org
Sat Jul 31 08:24:26 EDT 2021


New submission from Serhiy Storchaka <storchaka+cpython at gmail.com>:

>>> import typing
>>> T = typing.TypeVar('T')
>>> P = typing.ParamSpec('P')
>>> C = typing.Callable[P, T]
>>> C[int, str, float]
typing.Callable[[int], str]

int substitutes P as [int], str substitutes T, and the third argument float is ignored.

----------
components: Library (Lib)
messages: 398636
nosy: gvanrossum, kj, serhiy.storchaka
priority: normal
severity: normal
status: open
title: Arguments ignored in substitution in typing.Callable
type: behavior
versions: Python 3.10, Python 3.11

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue44793>
_______________________________________


More information about the Python-bugs-list mailing list