summaryrefslogtreecommitdiffstats
path: root/Lib/_collections_abc.py
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2021-07-31 17:05:45 (GMT)
committerGitHub <noreply@github.com>2021-07-31 17:05:45 (GMT)
commitbe4cb9089aaf58d5f90da5f9fa66dc3c6763b5a2 (patch)
tree7689c9df42d4b86b6d47f2f3a743588491a28156 /Lib/_collections_abc.py
parent0ad173249d287794d53e6a1fe2d58bb2adee2276 (diff)
downloadcpython-be4cb9089aaf58d5f90da5f9fa66dc3c6763b5a2.zip
cpython-be4cb9089aaf58d5f90da5f9fa66dc3c6763b5a2.tar.gz
cpython-be4cb9089aaf58d5f90da5f9fa66dc3c6763b5a2.tar.bz2
bpo-44794: Merge tests for typing.Callable and collection.abc.Callable (GH-27507)
Diffstat (limited to 'Lib/_collections_abc.py')
-rw-r--r--Lib/_collections_abc.py3
1 files changed, 1 insertions, 2 deletions
diff --git a/Lib/_collections_abc.py b/Lib/_collections_abc.py
index bff58ad..33db9b2 100644
--- a/Lib/_collections_abc.py
+++ b/Lib/_collections_abc.py
@@ -478,8 +478,7 @@ class _CallableGenericAlias(GenericAlias):
# then X[int, str] == X[[int, str]].
param_len = len(self.__parameters__)
if param_len == 0:
- raise TypeError(f'There are no type or parameter specification'
- f'variables left in {self}')
+ raise TypeError(f'{self} is not a generic class')
if (param_len == 1
and isinstance(item, (tuple, list))
and len(item) > 1) or not isinstance(item, tuple):