]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-120572: add missing parentheses in TypeIs documentation (#120573)
authorNyuan Zhang <blueglassblock@outlook.com>
Sun, 16 Jun 2024 05:36:10 +0000 (13:36 +0800)
committerGitHub <noreply@github.com>
Sun, 16 Jun 2024 05:36:10 +0000 (22:36 -0700)
Doc/library/typing.rst

index 94de64fcf835fc762504126b7189a534198d0098..bf0ff9bd348553ad01ddbd7c597b55f83e1610ee 100644 (file)
@@ -1454,8 +1454,8 @@ These can be used as types in annotations. They all support subscription using
    to write such functions in a type-safe manner.
 
    If a ``TypeIs`` function is a class or instance method, then the type in
-   ``TypeIs`` maps to the type of the second parameter after ``cls`` or
-   ``self``.
+   ``TypeIs`` maps to the type of the second parameter (after ``cls`` or
+   ``self``).
 
    In short, the form ``def foo(arg: TypeA) -> TypeIs[TypeB]: ...``,
    means that if ``foo(arg)`` returns ``True``, then ``arg`` is an instance