https://github.com/python/cpython/commit/f774d49b7a955662771135b5b88112cc786b42ee
commit: f774d49b7a955662771135b5b88112cc786b42ee
branch: 3.12
author: Nyuan Zhang <[email protected]>
committer: hauntsaninja <[email protected]>
date: 2024-06-15T23:50:27-07:00
summary:
[3.12] gh-120572: add missing parentheses in TypeIs documentation (GH-120573)
(#120578)
files:
M Doc/library/typing.rst
diff --git a/Doc/library/typing.rst b/Doc/library/typing.rst
index 1a5c21d3c94304..3d75573c133720 100644
--- a/Doc/library/typing.rst
+++ b/Doc/library/typing.rst
@@ -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
_______________________________________________
Python-checkins mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3/lists/python-checkins.python.org/
Member address: [email protected]