]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
bpo-44793: Fix checking the number of arguments when subscribe a generic type with...
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Mon, 2 Aug 2021 07:08:24 +0000 (00:08 -0700)
committerGitHub <noreply@github.com>
Mon, 2 Aug 2021 07:08:24 +0000 (00:08 -0700)
commitc8db292012dd84aab81eb3ed9146709696a3d290
tree0498ea32c9bf6ec748b2b06ad083684210e00317
parentb192fb3f6a99c33f664e27395ffc0cef4dbc8d29
bpo-44793: Fix checking the number of arguments when subscribe a generic type with ParamSpec parameter. (GH-27515)

For example Callable[P, T][[int], str, float] will now raise an error.

Use also term "arguments" instead of "parameters" in error
message for too few/many arguments.
(cherry picked from commit f92b9133ef67e77605cbd315b6b6c81036ce110e)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Lib/test/test_typing.py
Lib/typing.py
Misc/NEWS.d/next/Library/2021-07-31-20-28-20.bpo-44793.woaQSg.rst [new file with mode: 0644]