summaryrefslogtreecommitdiffstats
path: root/Doc/library/typing.rst
diff options
context:
space:
mode:
authorKen Jin <28750310+Fidget-Spinner@users.noreply.github.com>2021-01-11 00:11:41 (GMT)
committerGitHub <noreply@github.com>2021-01-11 00:11:41 (GMT)
commitace008c531dd685a30c1dd68f9b5ba35f20171cf (patch)
tree92fa7482600acffc7b40592d061a9c8d9c37c8c1 /Doc/library/typing.rst
parent81f87bbf9f65702062021a78abd9b8f82c98a414 (diff)
downloadcpython-ace008c531dd685a30c1dd68f9b5ba35f20171cf.zip
cpython-ace008c531dd685a30c1dd68f9b5ba35f20171cf.tar.gz
cpython-ace008c531dd685a30c1dd68f9b5ba35f20171cf.tar.bz2
Fix various ParamSpec errors in typing (GH-24176)
1. ParamSpec -> TypeVar for ``typing.Concatenate`` 2. ParamSpec's call signature should align with its documentation. Noticed in GH-24169
Diffstat (limited to 'Doc/library/typing.rst')
-rw-r--r--Doc/library/typing.rst4
1 files changed, 2 insertions, 2 deletions
diff --git a/Doc/library/typing.rst b/Doc/library/typing.rst
index c14c710..3b4dba3 100644
--- a/Doc/library/typing.rst
+++ b/Doc/library/typing.rst
@@ -695,10 +695,10 @@ These can be used as types in annotations using ``[]``, each having a unique syn
from collections.abc import Callable
from threading import Lock
- from typing import Any, Concatenate, ParamSpec
+ from typing import Any, Concatenate, ParamSpec, TypeVar
P = ParamSpec('P')
- R = ParamSpec('R')
+ R = TypeVar('R')
# Use this lock to ensure that only one thread is executing a function
# at any time.