]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Fix a typo in docs for typing.Concatenate (#24169)
authorJohan Dahlin <jdahlin@gmail.com>
Fri, 8 Jan 2021 18:08:21 +0000 (15:08 -0300)
committerGitHub <noreply@github.com>
Fri, 8 Jan 2021 18:08:21 +0000 (10:08 -0800)
Return param spec should be R, not T

Doc/library/typing.rst

index d74f8bcc27a20a11cd36aa5a95b3a15860027a43..c14c71081338190eb110e2eb0c4ab475a0c2038b 100644 (file)
@@ -707,7 +707,7 @@ These can be used as types in annotations using ``[]``, each having a unique syn
       def with_lock(f: Callable[Concatenate[Lock, P], R]) -> Callable[P, R]:
           '''A type-safe decorator which provides a lock.'''
           global my_lock
-          def inner(*args: P.args, **kwargs: P.kwargs) -> T:
+          def inner(*args: P.args, **kwargs: P.kwargs) -> R:
               # Provide the lock as the first argument.
               return f(my_lock, *args, **kwargs)
           return inner