diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2022-04-29 21:01:40 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-04-29 21:01:40 (GMT) |
commit | 81120b6754c67a8f1f00cbc3af6963c0e1945911 (patch) | |
tree | bc93c2acfa17ba7829421404c20f34d5767cd9a0 /Doc/library/typing.rst | |
parent | f6656163de483003697d510031827b7512056d55 (diff) | |
download | cpython-81120b6754c67a8f1f00cbc3af6963c0e1945911.zip cpython-81120b6754c67a8f1f00cbc3af6963c0e1945911.tar.gz cpython-81120b6754c67a8f1f00cbc3af6963c0e1945911.tar.bz2 |
bpo-44791: Accept ellipsis as the last argument of typing.Concatenate (#30969)
Diffstat (limited to 'Doc/library/typing.rst')
-rw-r--r-- | Doc/library/typing.rst | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Doc/library/typing.rst b/Doc/library/typing.rst index d4a6f32..0de3805 100644 --- a/Doc/library/typing.rst +++ b/Doc/library/typing.rst @@ -852,7 +852,8 @@ These can be used as types in annotations using ``[]``, each having a unique syn callable. Usage is in the form ``Concatenate[Arg1Type, Arg2Type, ..., ParamSpecVariable]``. ``Concatenate`` is currently only valid when used as the first argument to a :data:`Callable`. - The last parameter to ``Concatenate`` must be a :class:`ParamSpec`. + The last parameter to ``Concatenate`` must be a :class:`ParamSpec` or + ellipsis (``...``). For example, to annotate a decorator ``with_lock`` which provides a :class:`threading.Lock` to the decorated function, ``Concatenate`` can be |