summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>2024-06-16 05:51:29 (GMT)
committerGitHub <noreply@github.com>2024-06-16 05:51:29 (GMT)
commitd4e1d093d8efcf910a512377cd967c85b0715dac (patch)
treef18c4efd2f983a23c5db9d4e551bb534df2873e3
parenta19bb261a327e1008f219b62f6465941c981899b (diff)
downloadcpython-d4e1d093d8efcf910a512377cd967c85b0715dac.zip
cpython-d4e1d093d8efcf910a512377cd967c85b0715dac.tar.gz
cpython-d4e1d093d8efcf910a512377cd967c85b0715dac.tar.bz2
[3.13] gh-120572: add missing parentheses in TypeIs documentation (GH-120573) (#120575)
gh-120572: add missing parentheses in TypeIs documentation (GH-120573) (cherry picked from commit 1fa595963ed512b055d2a4faddef5a9e544288ac) Co-authored-by: Nyuan Zhang <blueglassblock@outlook.com>
-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 14dd9f6..6a36929 100644
--- a/Doc/library/typing.rst
+++ b/Doc/library/typing.rst
@@ -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