]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
[3.12] gh-120572: add missing parentheses in TypeIs documentation (GH-120573) (#120578)
authorNyuan Zhang <blueglassblock@outlook.com>
Sun, 16 Jun 2024 06:50:27 +0000 (14:50 +0800)
committerGitHub <noreply@github.com>
Sun, 16 Jun 2024 06:50:27 +0000 (23:50 -0700)
Doc/library/typing.rst

index 1a5c21d3c943049ef2c262708cf196614cfe3f64..3d75573c13372095479b365ab5517ab1da830217 100644 (file)
@@ -1394,8 +1394,8 @@ These can be used as types in annotations. They all support subscription using
                  print("Not a list of strings!")
 
    If ``is_str_list`` is a class or instance method, then the type in
-   ``TypeGuard`` maps to the type of the second parameter after ``cls`` or
-   ``self``.
+   ``TypeGuard`` maps to the type of the second parameter (after ``cls`` or
+   ``self``).
 
    In short, the form ``def foo(arg: TypeA) -> TypeGuard[TypeB]: ...``,
    means that if ``foo(arg)`` returns ``True``, then ``arg`` narrows from